Skip to main content
Participating Frequently
March 5, 2009
Answered

Pause and Play Button Switch

  • March 5, 2009
  • 3 replies
  • 526 views
I cannot figure out how to switch the pause and play button without using the timeline (two frames). I need to use AS(2) but for some reason I can't get the buttons to do swapDepths no matter what variation I use. I've tried to reference the file in the ( ) and referenced depth positions (-3). Is there another way to call the pause and play button to switch when they are released?
This topic has been closed for replies.
Correct answer Ned Murphy
So Actually, thanks for the idea. I figured that making the opposite button "go away" was a good idea and scripted the play or pause button to go off stage when pushed (mc._x = ??) and the other to return to normal position so that they would instantaneously appear and disappear. : )
Invisible buttons do not react to mice (I should say, buttons set as _visible = false).

3 replies

Ned Murphy
Legend
March 6, 2009
Glad you came back! It's worth knowing.

When the term 'invisible button' comes up, it commonly refers to a button that only has its HIT area defined, or possibly its _alpha set to 0. Those will react to mice.
akakjbAuthor
Participating Frequently
March 6, 2009
thanks, I did not know that.
Ned Murphy
Legend
March 5, 2009
I normally just change the visibility. I don't know if buttons can utilize the swapDepths method.
akakjbAuthor
Participating Frequently
March 6, 2009
Thanks but even if I make the pause button invisible it will still be over the top of the play button. So, when someone clicks the play button they will really still be just hitting the pause button.
akakjbAuthor
Participating Frequently
March 6, 2009
So Actually, thanks for the idea. I figured that making the opposite button "go away" was a good idea and scripted the play or pause button to go off stage when pushed (mc._x = ??) and the other to return to normal position so that they would instantaneously appear and disappear. : )