1 Reply Latest reply on Jan 30, 2011 7:03 PM by 2009 Matt

    Write the Move effect in ActionScript and the effectEnd event is NOT fired

    2009 Matt Level 1

      I have a simple Move effect in MXML:


      <mx:Move id="moveL" duration="25000" target="{targetT}" effectEnd="handler();" />


      It works fine. It moves the target and the handler methed is called correctly.


      Now I change the Move effect to ActionScript. Something like:


      import mx.effects.Move;


      private var move_left:Move;




      this.move_left = new Move(targetT);     

      this.move_left.addEventListener("effectEnd", handler);


      this.move_left.duration = 25000;


      It does move the target, but the handler method is not called at the effectEnd event. The "effectEnd" event may not even fired.

      I also tried mx.events.EffectEvent.EFFECT_END instand of "effectEnd". It still does not work.

      I could not find where is wrong. Could you?