Flash Actionscripting: concerning movie clips

Associate
Joined
9 Sep 2005
Posts
337
Is it possible to make a "static" (i.e it stays in the centre of the screen with the background creating the illusion of movement) movie clip run faster by adding some code (for example, the movie clip doubles in speed after pressing a button)?

Any help would be much appreciated!
 
socreative said:
use updateAfterEvent();

here's an example
http://weblog.motion-graphics.org/archives/2006/01/dynamic_frame_r.html

you'll get the idea. Just make the interval change depending on the button you press
have fun ;)

Thanks for the link. :)

However, I'm not fully sure what exactly the following code does:

Code:
var me = this;
	clearInterval(this.tweenFaster);
	this.tweenFaster = setInterval(timelineFaster, frameRate);

Entering a number (purely to test it) works but it only plays the clip once instead of "looping" the clip when using just:

Code:
attachMovie("Walk_mc", "Walk", 0);

Mainly as if you press a certain button (use X as an example), it will increase the frame rate, pressing X again will increase it further (so basically each time you press X the frame rate will increase by 5 for example).

If you can help then great, if not I'll have to try do some more research or try an alternative (yet less superior) way of trying to get my desired result.
 
Back
Top Bottom