Flash script - layered pause/play button

I have a pause and play button.   It goes without saying that I need the pause to pause and the play to play.  I have that working now with the code included, but my problem is....  I'd like for the buttons to be layered and swap between pause/play.
//script on the instance btn_play
on (press) { 
play(); 
} 
 
//script on the instance btn_pause
on (press) { 
pause(); 
}

Open in new window

sl1ngerAsked:
Who is Participating?
 
quizengineConnect With a Mentor Commented:
See new file with new behaviours. Check the stage for instructions on how to drop your buttons into the movie.
playpause-reversed-cs3.fla.jpg
0
 
quizengineCommented:
see the attached movie. Msg me if it doesn't make sense.
playpause-cs3.fla.jpg
0
 
sl1ngerAuthor Commented:
Do you know of a step by step tutorial for seomthing like  this?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
quizengineCommented:
I don't (know of a tutorial) but if my sample works for you, are you not able to look at the structure of this and learn from it ?

I'm happy to answer any questions on it, and I think because I have specifically built something that matches your needs, you have a much better chance of learning by pulling this to bits.

Do you agree ? Do you have questions you want to ask ?

0
 
sl1ngerAuthor Commented:
Yes.  Your example was good.  I'm trying to use this in conjunction with a pause and play button from the common library.
0
 
sl1ngerAuthor Commented:
Also, my movie starts and shows the pause button first because in my movie -- I'm making the ball roll from the start.  
0
 
sl1ngerAuthor Commented:
Thanks.  That makes sense now.  I found that it was breaking because I 'm using this every 24 frames --- stop();
var interval:Number = setInterval(
  function():Void {
    play();
    clearInterval(interval);
  },
  2000
);

Anyway, I can keep that.  Otherwise, I'll have to extend the frames to make pause longer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.