Skip to main content
Known Participant
December 18, 2006
Question

Set the duration of a movie clip

  • December 18, 2006
  • 2 replies
  • 307 views
Hi,
I have a moviclip that I want to play for a set duration. The MC only contains a couple of frames. I know I can just adjust the the amount of frames in the movie clip to get the desired length but it seems to be a bit tedious. Are there a way to set for how long I want the movie clip to play say 1.00 min?

Thanks

Jonas
This topic has been closed for replies.

2 replies

Participant
December 19, 2006
make a new layer, then make a new movieclip in the same timeline you want to control. It doesn't matter what it looks like as you'll make it invisible in a mo.

Click on the movieclip and put this action on it:

onClipEvent (load) {
_visible = false;
setInterval(function () {
_parent.stop();
}, 5000);
}

The _visible bit makes it invisibile
The number is the time in milliseconds before the clip will perform the function (ie make it stop)
Inspiring
December 18, 2006