mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 15:51:33 +00:00
AS3: Tests
This commit is contained in:
Vendored
+22
-14
@@ -1,28 +1,36 @@
|
||||
package {
|
||||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.text.TextField;
|
||||
import classes.Test;
|
||||
|
||||
public class TestMovie extends Sprite
|
||||
{
|
||||
|
||||
|
||||
public function TestMovie()
|
||||
{
|
||||
var display_txt:TextField = new TextField();
|
||||
display_txt.text = "Hello World!";
|
||||
addChild(display_txt);
|
||||
|
||||
var myXML:XML =
|
||||
<nodes>
|
||||
<node1>
|
||||
<node2 />
|
||||
</node1>
|
||||
</nodes>
|
||||
|
||||
delete myXML.node1.*
|
||||
trace(myXML);
|
||||
|
||||
var t:Test=new Test();
|
||||
var t:Test = new Test();
|
||||
t.testHello();
|
||||
}
|
||||
|
||||
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):*
|
||||
{
|
||||
return TestMovie[name];
|
||||
};
|
||||
trace(testFunction("staticVariable"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
+793
-418
File diff suppressed because it is too large
Load Diff
+12
-7
@@ -1,14 +1,19 @@
|
||||
package classes{
|
||||
public dynamic class TestClass1{
|
||||
public var attrib:int=5;
|
||||
|
||||
public function testHello(){
|
||||
package classes
|
||||
{
|
||||
|
||||
public dynamic class TestClass1
|
||||
{
|
||||
public var attrib:int = 5;
|
||||
public var sons:Array;
|
||||
|
||||
public function testHello()
|
||||
{
|
||||
trace("hello2");
|
||||
}
|
||||
|
||||
public function metoda(i:int):int
|
||||
public function method(i:int):int
|
||||
{
|
||||
trace("metoda");
|
||||
trace("method");
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
||||
+20
@@ -0,0 +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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package classes
|
||||
{
|
||||
|
||||
public class TestClass3
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package classes {
|
||||
public namespace myInternal = "http://www.adobe.com/2006/actionscript/examples";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user