-
Controlling frame rate through button press
Can anyone advise me on how to control the frame rate of my movie through button presses? I have a movie clip (slide4) on the timeline. The timeline has a stop on it so the mc is looping around the frame. The movie has a framerate of 24.
I have another movieclip within this one (timer) with the following code on it:
onClipEvent (load) {
_parent.stop();
startTime = getTimer();
function checkTime() {
_parent.stop();
currentTime = getTimer();
if (currentTime-startTime>=(1000/(framerate-1))) {
show = 1000/(currentTime-startTime);
startTime = getTimer();
_parent.Play();
}
}
}
I also have the following code in the first frame of 'slide4':
timer.framerate=12
When this frame is reached, it just gets stuck and doesn't go any further. Does anyone else have any suggestions?
Thanks!
-
i took a quick look at your code and the first thing that occurred to me is that you are not calling the checkTime function in the code you posted.
something like below will do it:
onClipEvent (enterFrame) {
checkTime()
}
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
|