1 Reply Latest reply on May 8, 2011 7:40 PM by Benoitcn

    Animate Class issue

               <s:Animate id="animateEffect"
                          target="{targetBox}" repeatCount="2" repeatBehavior="reverse" disableLayout="true" 
                          effectStart="effStart(event)" effectEnd="playButton.enabled=true;">
                     <!-- How can use dynamic value each time before the effect started -->
                     <!-- and I can't find any event before 'effectStart' so I can't change the value before it played -->
                       <s:SimpleMotionPath property="x" valueFrom="0" valueTo="{xPostion()}"/>
                       <s:SimpleMotionPath property="alpha" valueFrom="1" valueTo="0"/>
                   import mx.effects.AnimateProperty;
                   import mx.events.EffectEvent;
                   [Bindable]private var n:Number;
                   private function xPostion():Number{
                       n = Math.random() * 200;
                       return n;
                   /* the property affect next time , because the effect start with last value of n */
                   private function effStart(e:EffectEvent):void{
                       animateEffect.motionPaths[0] = new SimpleMotionPath("x", 0, xPostion());


      Another question does the TweenLite class has the ability giving the value from a function before it played ?