mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 12:08:46 +00:00
Embed tag test data separated
This commit is contained in:
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 362 B |
BIN
libsrc/ffdec_lib/testdata/as3_embed/bin/as3_embed.air.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/as3_embed/bin/as3_embed.air.swf
vendored
Normal file
Binary file not shown.
BIN
libsrc/ffdec_lib/testdata/as3_embed/bin/as3_embed.flex.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/as3_embed/bin/as3_embed.flex.swf
vendored
Normal file
Binary file not shown.
5
libsrc/ffdec_lib/testdata/as3_embed/build_air_debug.bat
vendored
Normal file
5
libsrc/ffdec_lib/testdata/as3_embed/build_air_debug.bat
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
set COMPILERKIND=air
|
||||
set SWFNAME=as3_embed
|
||||
call c:\air\bin\mxmlc.bat -debug=true -output bin/%SWFNAME%.%COMPILERKIND%.swf src/MainAir.as 1> buildlog.%COMPILERKIND%.txt 2>&1
|
||||
rem -warnings=false
|
||||
3
libsrc/ffdec_lib/testdata/as3_embed/build_both_debug.bat
vendored
Normal file
3
libsrc/ffdec_lib/testdata/as3_embed/build_both_debug.bat
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
call build_flex_debug.bat
|
||||
call build_air_debug.bat
|
||||
5
libsrc/ffdec_lib/testdata/as3_embed/build_flex_debug.bat
vendored
Normal file
5
libsrc/ffdec_lib/testdata/as3_embed/build_flex_debug.bat
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
set COMPILERKIND=flex
|
||||
set SWFNAME=as3_embed
|
||||
c:\flex\bin\mxmlc.exe -debug=true -output bin/%SWFNAME%.%COMPILERKIND%.swf src/MainFlex.as 1> buildlog.%COMPILERKIND%.txt 2>&1
|
||||
rem -warnings=false
|
||||
30
libsrc/ffdec_lib/testdata/as3_embed/src/MainAir.as
vendored
Normal file
30
libsrc/ffdec_lib/testdata/as3_embed/src/MainAir.as
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
import tests_classes.TestEmbedAir;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class MainAir extends Sprite
|
||||
{
|
||||
|
||||
TestEmbedAir;
|
||||
|
||||
public function MainAir()
|
||||
{
|
||||
if (stage) init();
|
||||
else addEventListener(Event.ADDED_TO_STAGE, init);
|
||||
}
|
||||
|
||||
private function init(e:Event = null):void
|
||||
{
|
||||
removeEventListener(Event.ADDED_TO_STAGE, init);
|
||||
// entry point
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
30
libsrc/ffdec_lib/testdata/as3_embed/src/MainFlex.as
vendored
Normal file
30
libsrc/ffdec_lib/testdata/as3_embed/src/MainFlex.as
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
import tests_classes.TestEmbedFlex;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class MainFlex extends Sprite
|
||||
{
|
||||
|
||||
TestEmbedFlex;
|
||||
|
||||
public function MainFlex()
|
||||
{
|
||||
if (stage) init();
|
||||
else addEventListener(Event.ADDED_TO_STAGE, init);
|
||||
}
|
||||
|
||||
private function init(e:Event = null):void
|
||||
{
|
||||
removeEventListener(Event.ADDED_TO_STAGE, init);
|
||||
// entry point
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
66
libsrc/ffdec_lib/testdata/as3_embed/src/tests_classes/TestEmbedAir.as
vendored
Normal file
66
libsrc/ffdec_lib/testdata/as3_embed/src/tests_classes/TestEmbedAir.as
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
package tests_classes
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.media.Sound;
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.MovieClip;
|
||||
import flash.media.Sound;
|
||||
import flash.utils.ByteArray;
|
||||
|
||||
public class TestEmbedAir extends Sprite
|
||||
{
|
||||
[Embed(source="../../assets/image.png")]
|
||||
public var imagePngClass:Class;
|
||||
|
||||
[Embed(source="../../assets/image.png")]
|
||||
public var sameImageClass:Class;
|
||||
|
||||
[Embed(source="../../assets/image_grid.png", scaleGridTop="10", scaleGridBottom="40",
|
||||
scaleGridLeft="10", scaleGridRight="70")]
|
||||
public var imageGridPngClass:Class;
|
||||
|
||||
//deprecated in Flex, not supported in AIR
|
||||
//[Embed(source="../../assets/image.svg")]
|
||||
//public var imageSvgClass:Class;
|
||||
|
||||
[Embed(source="../../assets/movie.swf")]
|
||||
public var movieSwfClass:Class;
|
||||
|
||||
[Embed(source="../../assets/movie_singleframe.swf")]
|
||||
public var movieSingleFrameSwfClass:Class;
|
||||
|
||||
[Embed(source="../../assets/sound.mp3")]
|
||||
public var soundClass:Class;
|
||||
|
||||
//not supported in Flex, AIR only
|
||||
[Embed(source="../../assets/font.ttf", fontFamily="Great Vibes", fontWeight= "normal", fontStyle = "normal", mimeType="application/x-font-truetype")]
|
||||
private var fontClass:Class;
|
||||
|
||||
[Embed(source="../../assets/data.bin", mimeType="application/octet-stream")]
|
||||
public var binaryDataClass:Class;
|
||||
|
||||
|
||||
|
||||
|
||||
public function TestEmbedAir()
|
||||
{
|
||||
var someBitmap:Bitmap = new imagePngClass() as Bitmap;
|
||||
trace("Dimensions: " + someBitmap.width + "x" + someBitmap.height);
|
||||
|
||||
var someGridSprite:Sprite = new imageGridPngClass() as Sprite;
|
||||
|
||||
//var someSprite:Sprite = new imageSvgClass() as Sprite;
|
||||
|
||||
var someMovieClip:MovieClip = new movieSwfClass() as MovieClip;
|
||||
|
||||
var someSpriteSwf:Sprite = new movieSingleFrameSwfClass() as Sprite;
|
||||
|
||||
var someSound:Sound = new soundClass() as Sound;
|
||||
someSound.play();
|
||||
|
||||
var someData:ByteArray = new binaryDataClass() as ByteArray;
|
||||
trace("Length: " + someData.length);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ package tests_classes
|
||||
import flash.media.Sound;
|
||||
import flash.utils.ByteArray;
|
||||
|
||||
public class TestEmbed extends Sprite
|
||||
public class TestEmbedFlex extends Sprite
|
||||
{
|
||||
[Embed(source="../../assets/image.png")]
|
||||
public var imagePngClass:Class;
|
||||
@@ -20,8 +20,8 @@ package tests_classes
|
||||
public var imageGridPngClass:Class;
|
||||
|
||||
//deprecated in Flex, not supported in AIR
|
||||
//[Embed(source="../../assets/image.svg")]
|
||||
//public var imageSvgClass:Class;
|
||||
[Embed(source="../../assets/image.svg")]
|
||||
public var imageSvgClass:Class;
|
||||
|
||||
[Embed(source="../../assets/movie.swf")]
|
||||
public var movieSwfClass:Class;
|
||||
@@ -42,7 +42,7 @@ package tests_classes
|
||||
|
||||
|
||||
|
||||
public function TestEmbed()
|
||||
public function TestEmbedFlex()
|
||||
{
|
||||
var someBitmap:Bitmap = new imagePngClass() as Bitmap;
|
||||
trace("Dimensions: " + someBitmap.width + "x" + someBitmap.height);
|
||||
Binary file not shown.
Binary file not shown.
@@ -143,8 +143,6 @@ package
|
||||
|
||||
TestOtherClass;
|
||||
|
||||
TestEmbed;
|
||||
|
||||
public function Main()
|
||||
{
|
||||
if (stage) init();
|
||||
|
||||
Reference in New Issue
Block a user