[ascoders] Eventdispatcher

  • From: André Michelle <am@xxxxxxxxxxxxxxxxxx>
  • To: <ascoders@xxxxxxxxxxxxx>
  • Date: Tue, 2 Mar 2004 21:22:43 +0100

Aus welchem Grund kann es sein, dass mein EventDispather nicht ausgeführt
wird, sobald dass Event von einem Button kommt ?

class Device extends MovieClip {

 function Device () {
   EventDispatcher.initialize(this);
   drag_btn.onPress = function () {
    this._parent.startDragDevice();
   }
}

 function applySlots ( slot: Slot ): Void {
  addEventListener( "startDrag" , slot );
  startDragDevice();
 }

 function startDragDevice (): Void {
// wird bei applySlots UND onPress ausgeführt.
  trace( "____startDragDevice" );

  // Der nur bei applySlots
  dispatchEvent( { type:"startDrag", target: this  } );
  //startDrag( false );
 }

Timingprobleme schliesse ich aus, auch wenn es das sonst immer zu 99% ist
:o)


--
aM

------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

Other related posts: