Wednesday, November 26, 2008

Sunday, November 16, 2008

Flash AS3 Custom Component - parameters

If the parameters are modified during authoring time,
they are not ready til after the constructor is called.


package{
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class Testing extends MovieClip{
[Inspectable]
public var id:Number = 0;
function Testing(){
this.addEventListener(MouseEvent.CLICK, mouseclick);
}
function mouseclick(e:MouseEvent):void{
trace("id" + id);
}
}
}