flash on 2012-5-9
♥0 |
Line 25 |
Modified 2012-05-09 00:48:10 |
MIT License
archived:2017-03-20 11:00:35
ActionScript3 source code
/**
* Copyright geckojsc ( http://wonderfl.net/user/geckojsc )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/noQE
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var t:TextField = new TextField()
addChild(t);
t.appendText("hi\n");
t.appendText(new Data(1,2).info());
var a:Object = {x:3, y:4};
var b:Data = a as Data;
t.appendText(b.info());
}
}
}
dynamic class Data {
public var x:int, y:int;
public function Data(x:int, y:int) {
this.x = x;
this.y = y;
}
public function info():String {
return this.x+", "+this.y+"\n";
}
}