PDA

View Full Version : Actionscript timeline effect



ageshi
January 9th, 2008, 06:09 PM
Hey everyone,

I'm working on a project that requires an animated "timeline" bar that increases in width as the movie progresses. Very much like a simple pre loader bar, I want to use AS to:

1. Increase the width of the bar as the movie progresses
2. Determine the length of the entire movie and Sync the horizontal movement of the to it.


Can anyone suggest how I could go about doing this?

thanks alot!

glosrfc
January 9th, 2008, 06:46 PM
Exactly the same as a preloader bar. Use the mc._totalframes property to determine the length of your project and then use the mc._currentframe property to determine where you are as the project plays. You can then reflect the width of the bar as a percentage of the current frame/total frames.

Try using a preloader example but replacing the usual _framesloaded with _currentframe.