1 Reply Latest reply on Feb 16, 2010 12:21 AM by Francisc

    how do i set dynamically the endEffect property

    eranweingart

      i'm using the Glow effect, but i want to set the endEffect dynamically, so i will not be limited to one function only.

      how do i do that?

       

      i tried something like tha, but it didn't work:

       

      private var _callBackFunction:Function;

       

      private function function1():void{

           _callBackFunction.apply(function1());

           _glowEffect1.play();

      }

      private function function2():void{

           _callBackFunction.apply(function1());

           _glowEffect1.play();

      }

       

      private function callRightFunction():void{

           _callBackFunction.call();

      }

       

      <mx:Glow

      id="_glowEffect1"

       

      duration="

      1000"

      strength="

      4"

      blurXFrom="

      50"

      blurXTo="

      50"

      effectEnd="callRightFunction()"

       

       

       

       

       

      />