-
Loop single frame with AS
I have a main timeline with 3 frames. I use AS2 to pause them, with
PHP Code:
function pause(){
play();
clearInterval(timer);
};
stop();
timer = setInterval(pause, 2500);
in the first frame, and just
PHP Code:
stop();
timer = setInterval(pause, 5000);
on the next two.
It's basically a slideshow, with no fancy transitions or animation.
However, on frame two, I have a Movie Clip with an animation that plays for 60 frames/4 seconds. I'm AS noob, but assume the stop hinders the MC playing.
What I want is this frame to play (or loop ?) for 4 seconds, preferably with AS, instead of inserting frames in the main timeline for the duration of the MovieClip.
The solutions I've found so far all involve scripts with two or more frames.
Any help, hints and suggestions would be greatly appreciated.
-
Teacosy is coming
If you stop the parent timeline (eg the main sage), then the child timeline (eg a MovieClip on the stage) will keep playing. So you don't need to anything extra for what you want to achieve.
-
I couldn't get it to work for the life of me, but reading this, I understood the problem was not in the AS itself. Somehow the MC had changed property to Graphic.
Thanks for the quick reply, and patience with a beginner - very much appreciated.
-
Teacosy is coming
Ah yes. A graphic won't loop if you stop the timeline it's on because it doesn't have it's own timeline like a MovieClip does -- it syncs with the timeline it's on, so if you stop the parent timeline then the graphic will also stop.
Since you mentioned MovieClip, I didn't think to suggest checking it's not a graphic.
Graphics are great, I use them a lot as an animator, but they are better suited to stuff that is linear and that you want to have granular control of in the IDE's main timeline because you know which frame will show when.
But if you want to do anything interactive/dynamic then you need to turn to MovieClips instead!
I'm glad you solved your problem, it's a good lesson to learn
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
|