View Single Post
  #6 (permalink)  
Old 10-22-2003, 01:13 PM
Sualdam Sualdam is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Posts: 1,087
Sualdam RepRank 0
Default

What you need to do is have a button/keframe on frame 1 then have another keyframe on say frame 5.

That means you effectively have two separate buttons that you can apply actions to.

You'll have a stop() action on frames 1 and 5 as well so that the playhead stops in those places.

On each button put this code:
Code:
on(release){
play();
}
Now test it.

It will start frozen on frame 1 because of the stop() action.

Click the button and the playhead will now play up until frame 5, then it stops again.

Click the button again and the playhead continues, and jumps back to frame 1 when it reaches the end of the movie unless you have another stop action to prevent it.

I'll post a sample later.

(Note: In the simple example above you don't necessarily have to have two keyframes in the button layer because the code is the same - but in your real situation you'll want different code probably, so you'll need the two keyframes then).
__________________
Sualdam
Reply With Quote