diff --git a/trunk/testdata/as2/Box.as b/trunk/testdata/as2/Box.as new file mode 100644 index 000000000..3a8f2503a --- /dev/null +++ b/trunk/testdata/as2/Box.as @@ -0,0 +1,17 @@ +class Box extends MovieClip{ + // declare class members + var box_mc:MovieClip; + // Constructor that takes mc as argument + public function Box(passed_mc:MovieClip){ + // assign passed mc to our class member + box_mc = passed_mc; + } + // Methods + public function moveUp(){ + box_mc._y -= 1; + } + + public function moveDown(){ + box_mc._y += 20; + } +} \ No newline at end of file diff --git a/trunk/testdata/as2/Cox.as b/trunk/testdata/as2/Cox.as new file mode 100644 index 000000000..9789fe979 --- /dev/null +++ b/trunk/testdata/as2/Cox.as @@ -0,0 +1,12 @@ +class Cox extends Box{ + public function Cox(passed_mc:MovieClip){ + super(passed_mc); + } + // Methods + public function testPublic(){ + trace("pub"); + } + private function testPrivate(){ + trace("priv"); + } +} \ No newline at end of file diff --git a/trunk/testdata/as2/Enemy.as b/trunk/testdata/as2/Enemy.as new file mode 100644 index 000000000..8a066dc6c --- /dev/null +++ b/trunk/testdata/as2/Enemy.as @@ -0,0 +1,29 @@ +class Enemy implements Moving { + var x:Number; + var tst:Number = 5; + var tst2:Number; + // constructor + function Enemy(px:Number) { + var k=57; + k=k*27; + var c=k; + x = px+c; + } + function moveLeft(lx:Number) { + x -= lx; + tst=7; + //hovno="bagr"; + trace("moveLeft = " + x); + } + function moveRight(rx:Number) { + x += rx; + trace("moveRight = " + x); + } + function moveUp(uy:Number) { + // leave it empty , dont need it + // but must implement it. + } + function moveDown(dy:Number) { + + } +} \ No newline at end of file diff --git a/trunk/testdata/as2/Moving.as b/trunk/testdata/as2/Moving.as new file mode 100644 index 000000000..8ba439d06 --- /dev/null +++ b/trunk/testdata/as2/Moving.as @@ -0,0 +1,6 @@ +interface Moving extends Moving2{ + function moveUp(py:Number); + function moveDown(py:Number); + function moveLeft(px:Number); + function moveRight(px:Number); +} \ No newline at end of file diff --git a/trunk/testdata/as2/Moving2.as b/trunk/testdata/as2/Moving2.as new file mode 100644 index 000000000..54ec960df --- /dev/null +++ b/trunk/testdata/as2/Moving2.as @@ -0,0 +1,6 @@ +interface Moving2 +{ + function moveUp(py:Number); + function moveDown(py:Number); + function moveLeft(px:Number); +} \ No newline at end of file diff --git a/trunk/testdata/as2/Ship.as b/trunk/testdata/as2/Ship.as new file mode 100644 index 000000000..003c8f6d8 --- /dev/null +++ b/trunk/testdata/as2/Ship.as @@ -0,0 +1,21 @@ +class Ship implements Moving{ + var y; + // constructor + function Ship(py:Number){ + y = py; + } + function moveUp(uy:Number){ + y *= uy; + trace("moveUp = "+y); + } + function moveDown(dy:Number){ + y *= dy; + trace("moveDown = "+y); + } + function moveLeft(lx:Number){ + // empty + } + function moveRight(rx:Number){ + // empty + } +} \ No newline at end of file diff --git a/trunk/testdata/as2/as2.fla b/trunk/testdata/as2/as2.fla index caf1fb8a0..f96c0708f 100644 Binary files a/trunk/testdata/as2/as2.fla and b/trunk/testdata/as2/as2.fla differ diff --git a/trunk/testdata/as2/as2.swf b/trunk/testdata/as2/as2.swf index 7abb92210..077466a87 100644 Binary files a/trunk/testdata/as2/as2.swf and b/trunk/testdata/as2/as2.swf differ diff --git a/trunk/testdata/as2/com/jpexs/MyTest.as b/trunk/testdata/as2/com/jpexs/MyTest.as new file mode 100644 index 000000000..632460b74 --- /dev/null +++ b/trunk/testdata/as2/com/jpexs/MyTest.as @@ -0,0 +1,15 @@ +class com.jpexs.MyTest { + private var i:Number=5; + static var k:Number=27; + + function test():Number + { + trace("hello"); + return 5; + } + static function testS():Number + { + trace("hi"); + return 88; + } +} \ No newline at end of file diff --git a/trunk/testdata/as3/TestMovie.fla b/trunk/testdata/as3/as3.fla similarity index 99% rename from trunk/testdata/as3/TestMovie.fla rename to trunk/testdata/as3/as3.fla index 4e0995c01..344d6778e 100644 Binary files a/trunk/testdata/as3/TestMovie.fla and b/trunk/testdata/as3/as3.fla differ diff --git a/trunk/testdata/as3/TestMovie.html b/trunk/testdata/as3/as3.html similarity index 84% rename from trunk/testdata/as3/TestMovie.html rename to trunk/testdata/as3/as3.html index 86bc57476..2cb16b28d 100644 --- a/trunk/testdata/as3/TestMovie.html +++ b/trunk/testdata/as3/as3.html @@ -1,7 +1,7 @@  - TestMovie + as3