I think your issue now is how you are constructing your TweenLite/Max code.

I am not sure if "var myTween:TweenMax = new TweenMax(leftHand, 2,
{x:400});" is the correct formatting.  

If you are trying to have a tween reversed, I would look into
TimelineLite/Max: http://blog.greensock.com/timelinelite/

I do not have any experience with this code yet, but I believe this is the
route you want to take if wanting to reverse a tween.

Nathan Mynarcik 
Interactive Web Developer
nat...@mynarcik.com 
254.749.2525
www.mynarcik.com

-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of beno -
Sent: Friday, December 11, 2009 2:21 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Lost My checkFrame

On Fri, Dec 11, 2009 at 4:02 PM, Nathan Mynarcik <nat...@mynarcik.com>wrote:

> That was a change after I gave him the Main.as file.  You only need one
> conditional test beno.  Each hand was being passed to that checkFrame
> function.  When a frame reached frame 40, you can enter anything you want
> to
> happen after that.
>
> public function checkFrame(e:Event):void
> {
>        if (e.target.currentFrame == 40)
>        {
>                 //Enter code that needs to execute when frame 40 is
reached
>        }
> }
>

I just edited to this:

            if (e.target.currentFrame == 40)
            {
                e.target.stop();
                trace("hand is done tweening");
                e.target.removeEventListener(Event.ENTER_FRAME, checkFrame);
//                TweenMax.from(leftHand, 2, {x:200});
                var myTween:TweenMax = new TweenMax(leftHand, 2, {x:400});
                myTween.totalProgress = 1;
                myTween.reverse();
            }

but it still didn't work. Also, I took out everything after the line
commented out previously with no good results.
beno
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to