mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 17:08:10 +00:00
package/namespace test classes added to as3 text swf. todo: create unit test
This commit is contained in:
21
libsrc/ffdec_lib/testdata/as3/TestMovie.as
vendored
21
libsrc/ffdec_lib/testdata/as3/TestMovie.as
vendored
@@ -1,8 +1,9 @@
|
||||
package
|
||||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.text.TextField;
|
||||
import classes.Test;
|
||||
import classes.mypackage1.TestClass2;
|
||||
|
||||
public class TestMovie extends Sprite
|
||||
{
|
||||
@@ -12,24 +13,28 @@
|
||||
{
|
||||
var display_txt:TextField = new TextField();
|
||||
display_txt.text = "Hello World!";
|
||||
display_txt.width = 300;
|
||||
addChild(display_txt);
|
||||
var t:Test = new Test();
|
||||
t.testHello();
|
||||
testObj({a:5,b:6,c:7});
|
||||
testObj({a:5,b:6,c:7});
|
||||
var t2:TestClass2 = new TestClass2();
|
||||
display_txt.text = t2.testCall();
|
||||
}
|
||||
|
||||
public function testObj(o:Object)
|
||||
{
|
||||
trace(o);
|
||||
}
|
||||
|
||||
public function testObj(o:Object){
|
||||
trace(o);
|
||||
}
|
||||
|
||||
public static var staticVariable:int = 5;
|
||||
public static var staticVariable2:int = 5;
|
||||
|
||||
|
||||
public function testStatic2():int
|
||||
{
|
||||
return TestMovie.staticVariable + TestMovie.staticVariable2;
|
||||
}
|
||||
|
||||
|
||||
public function testStatic():void
|
||||
{
|
||||
var testFunction:Function = function(name:String):*
|
||||
|
||||
@@ -885,7 +885,7 @@
|
||||
public function testVector2()
|
||||
{
|
||||
var a:Vector.<Vector.<int>> = new Vector.<Vector.<int>>();
|
||||
var b:Vector.<int> = new <int>[10,20,30];
|
||||
var b:Vector.<int> = new <int>[10, 20, 30];
|
||||
}
|
||||
|
||||
public function testFinallyOnly(){
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package classes
|
||||
{
|
||||
|
||||
|
||||
public dynamic class TestClass1
|
||||
{
|
||||
public var attrib:int = 5;
|
||||
public var sons:Array;
|
||||
|
||||
|
||||
public function testHello()
|
||||
{
|
||||
trace("hello2");
|
||||
}
|
||||
|
||||
|
||||
public function method(i:int):int
|
||||
{
|
||||
trace("method");
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package classes
|
||||
{
|
||||
|
||||
|
||||
public dynamic class TestClass2
|
||||
{
|
||||
public var attrib1:int;
|
||||
public var attrib2:int;
|
||||
public var attrib3:int;
|
||||
|
||||
|
||||
public function TestClass2(a1:String)
|
||||
{
|
||||
trace("Class2 construct");
|
||||
}
|
||||
|
||||
|
||||
public static function createMe(a1:String):TestClass2
|
||||
{
|
||||
return new TestClass2(a1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,9 +39,9 @@
|
||||
private static var svgxml:Class;
|
||||
|
||||
[Embed(source="text.txt",
|
||||
mimeType="application/octet-stream")]
|
||||
mimeType="application/octet-stream")]
|
||||
private static var txt:Class;*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package classes {
|
||||
public namespace myInternal = "http://www.adobe.com/2006/actionscript/examples";
|
||||
}
|
||||
|
||||
package classes
|
||||
{
|
||||
public namespace myInternal = "http://www.adobe.com/2006/actionscript/examples";
|
||||
}
|
||||
Reference in New Issue
Block a user