forked from: Basic Class
forked from Basic Class (diff: 1)
ActionScript3 source code
/**
* Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
* GNU General Public License, v3 ( http://www.gnu.org/licenses/quick-guide-gplv3.html )
* Downloaded from: http://wonderfl.net/c/6fyl
*/
// forked from RTLShadow's Basic Class
package {
import flash.text.TextField;
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite {
public function Main(){
addEventListener(Event.ADDED_TO_STAGE, init); // Adding the Event Listener so that we willl know when the stage is initialized.
}
public function init(e:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, init); // Removing the Event Listener for garbage collecting.
trace("Stage initialized. Ready to execute code.")
// Place all of your code here...
debug(); // You can ignore this. It's just to show that the init() is working.
}
public function debug():void{
var myTextField:TextField = new TextField();
myTextField.appendText("Stage Initialized. \n");
addChild(myTextField)
}
}
}