-
Movie Clip Time Out/Wait Function
Hello,
I have a Flash 8 movie where I need to have a movie clip that will periodically appear on stage in certain frames. After reaching a frame containing the movie clip -the movie clip needs to time out/wait for five seconds before it plays.
What ActionScript would accomplish this? Should the ActionScript be located in the first frame of the movie or embedded within the movie clip?
I attempted to use the following code within the movie clip and although it worked to control the movie clip, it interfered with cue point .flv goToAndStop functions on the main timeline:
Code:
function wait() {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, 5*1000); // stop for 5 seconds
}
wait();
Thanks!
James
-
Senior Member
place this in the frame where you wish the timeout to occur.
PHP Code:
stop(); setTimout(func0,5000); function func0(){ play(); }
-
Thanks for the suggestion. Please consider the following.
The problem with the code used in the first note was that it interfered with the .flv cue point actions on the main time line. Perhaps the reason for that is because the wait and play code needs to be targeted to a specific _mc. Instead the wait and play code was interfering with goToAndStop code used with the .flv and cue points.
Is there any other code that would target the _mc with the wait and play code. And if so, what would that be?
Thanks.
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
|