-
Hi all
Does anyone know if there is any way of changing the movie's frame rate during runtime from actionscript? Many thanks in advance.
Ade
-
Pillow Daddy
Nope. Sorry its not possible
-
Flash Initiate
I beg to differ...
not really - you can't do it - but you can CHEAT to make it look as though you can.
Make a blank movieclip
call it "controlClip" or whetever
Put all the contents you want to speed up into another MC call it "contents" say, then:
Put this in controlClip
Frame 1:
stop;
Frame 2:
tellTarget ("_root.contents") {
gotoAndPlay (_currentframe + 2);
}
Frame 3:
gotoAndPlay (1);
Now when you want to call it put:
tellTarget ("_root.controlClip") {
gotoAndPlay (2);
}
in your main timeline and when you want to return to the current speed:
tellTarget ("_root.controlClip") {
gotoAndStop (1);
}
This should double the speed of the MC "contents" by skipping every other frame.
It's a bit long winded, but it works!
Hope it helps in some way.
Stu
-
Thanks people, unfortunatley I was looking for a way of speeding the movie up without skipping frames. Oh well, Back to the drawing board. Thanks again.
Ade
-
You can speed up the movie without speeding up the frame rate. Unfortunately, it involves a pretty much ground-up design, so if you have much time invested it probably won't be worth it.
You would have to do all tweening that you wanted sped up programatically. Then instead of changing the values based on a frame or number of frames passing, change the value based on a number of ticks (use the global getTimer function to retrieve the number of milliseconds since the movie started). You can then factor in a variable that allows you adjust your movement relative to the time passed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|