Yup, it should.. Thanx for spotting that ;-)

private static var dispatcherInit = 
EventDispatcher.initialize(Settings.prototype);

regards,
Muzak

----- Original Message ----- 
From: "Fumio Nonaka" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, January 18, 2007 2:38 AM
Subject: Re: [Flashcoders] A v2 Window with a Checkbox and a Button


> Hi Muzak,
>
> Shouldn't the EventDispatcher.initialize() apply to the prototype of a class?
> _____
>> The checkbox and button aren't ready (initialized) by the time the Window 
>> complete event is triggered.
>>
>> To found out when the Settings movieclip is ready, attach a class to the 
>> movieclip (call it Settings), which extends the 
>> MovieClip class.
>> Define an onLoad method and dispatch an event.
>>
>> import mx.events.EventDispatcher;
>> class Settings extends MovieClip {
>    // private static var dispatcherInit = 
> EventDispatcher.initialize(Object(Settings));
>       private static var dispatcherInit = 
> EventDispatcher.initialize(Settings.prototype);
>>  // EventDispatcher methods
>>  public var dispatchEvent:Function;
>>  public var addEventListener:Function;
>>  public var removeEventListener:Function;
>>  //=================================
>>  // CONSTRUCTOR
>>  //=================================
>>  function Settings() {
>>   trace("Settings ::: CONSTRUCTOR");
>>  }
>>  //=================================
>>  // PRIVATE METHODS
>>  //=================================
>>  private function onLoad() {
>>   trace("Settings ::: onLoad");
>>   this.dispatchEvent({type:"ready"});
>>  }
>> }
>
> Good luck,
> -- 
> Fumio Nonaka


_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

Reply via email to