You can dispatch a Event at creation time, but no listener can listen to
this event at creation time ;-)
What came first....The chicken or the egg? ;-)
Luca Candela schrieb:
> ------------------
> class tryOut {
>
> public var addEventListener:Function;
> public var removeEventListener:Function;
> private var dispatchEvent:Function;
>
> function tryOut() {
> mx.events.EventDispatcher.initialize(this);
> trace("I am Here 1");
> dispatchEvent({type:"created", target:this});
>
> }
>
> public function callMe():Void {
> dispatchEvent({type:"created", target:this});
> }
> }
> ------------------
> when I instantiate this class everything works except the dispatchEvent in
> the constructor of the class. Why and how can I do to force an object to
> call me back when he is created?
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com