Just a test (nothing ineresting)
package {
import flash.display.AVM1Movie;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
trace();
if (stage) {
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, init);
}
}
private function init(e:Event=null):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
addGUI();
}
private function addGUI():void {
var tf:TextField = new TextField();
tf.text = "do";
var s:Sprite = new Sprite();
var g:Graphics = s.graphics;
g.beginFill(0x00ccff, 1);
g.drawCircle(10, 10, 20);
g.endFill();
addChild(s);
addChild(tf);
}
}
}