Timeline control
- Started
- Last post
- 4 Responses
- Bullitt
Trying to play a movie clip forwards and backwards with buttons.
I have my buttons on the main timeline and want to add the acionscript to these to control the movie clip. Anyone help me out here I guide me to a link I can use?
- PIZZA0
Use a Tween engine
- nuggler0
You don't need a Tween engine if you're already using timelines.
The back button would start an onEnterFrame saying mc.prevFrame();and the forward button would change that to
mc.nextFrame();
Then you could add conditionals to stop or loop the timelines when they reach the end or beginning.
- fyoucher10
Use a tween engine like Tweener, Greensock.com's MaxTween, or if you're using AS2, I liked mc_tween2 which can be found here >
http://hosted.zeh.com.br/mctween…You can even use easing with a tween engine ("easeOutQuart", "easeInOutCubic", etc). Don't waste your time trying to code it yourself when there's a solution that's 10 times easier and efficient.
For mc_tween2 just put the AS script next to your FLA file. Then write #include "mc_tween2.as" (or whatever the name of the AS file is). Then where ever you need to do a timeline tween, you can write something like myClip.frameTo(35, 1, "linear"); If you want you can even make it do something when it has completed the tween (read the doc for callback function). That site is documented really well and it's really easy to understand.
Personally, if I were you, I'd just get started using Greensock's MaxTween since that's what a lot of people use and is very similar to Flash's built in tween engine.
http://www.greensock.com/
- i_monk0
You Are Here