Actionscript AS3 tween movieclip on guide

I'm writing in as3.
I want to tween a movieclip along a guide. I have the guide drawn out and made into a guide layer. I have the movieclip linked to the layer beneath it. I want to tween the movieclip via actionscript so I can ease it, and also because it's smoother.

How can I make the movieclip move along the guides? I've snapped it to the guide, but it just moves in a straight line.

Here is the code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var ball1:Tween = new Tween(tape_mc, "x", Strong.easeOut, 0, 1000, 3, true);

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

here is a good resourse...

click on the "using actionscript 3" heading
crittle1Author Commented:
would this tutorial also apply to CS3?
I know there are better features in CS4 and I want to be sure before I jump in.
crittle1Author Commented:
Thanks for the link, I looked at the page and yes I can apply some of it to CS3.
Unfortunately, they use keyframes to make the motion tween and I don't want to do this because the animation is choppy.
I want to create the motion tween via actionscript, then attach it to a guide on the stage but I don't know how to connect the two.

Any other ideas?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

crittle1Author Commented:

Anyone know if I can do this or not?
The only way i can think to do this is with CS3 compatibility is..

Create the animation and convert to symbol.
Now use actionscript to tween the 'frame' property of your movieclip.

Only certain tween engines allow you to tween frames. One such engine is greensocks' tweenLite.

I used the following code snippet and it works fine, however you need to set-up class paths to the downloaded classe.

see the attached .swf for proof (remove .txt)
here i used the bounce effect with motion guides.

If you want the .fla let me know.

import gs.TweenLite;
import gs.easing.*
var a1:Anim1 = new Anim1();
addChild(a1);, 2,{frame:100, ease:gs.easing.Bounce.easeOut});

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
crittle1Author Commented:
Thanks for the responses. I went ahead and tweened via a motion guide and the tween class. Took longer, but I ended up with the results I wanted. I will check into the greensocks' tweenLite. Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.