I don't want to constantly be saying "This code is interesting but you actually shouldn't use it." So I'll say it once...
I think it's important to mention that some of the code posted here is for reading and playing around only. Things like this:
Actionscript:
-
var e:String = "addEventListener";
-
-
stage[e]("click", function():void{
-
trace("click", arguments[0]);
-
});
A stage listener that combines square brace syntax, an anonymous function and the arguments array... is fun to write... maybe fun to read... but real projects should use more normal practices:
Actionscript:
-
stage.addEventListener(MouseEvent.CLICK, onStageClick);
-
function onStageClick(evt:MouseEvent):void {
-
trace("clicked", evt);
-
}
more to come on this page....