3

Using ActionScript 2.0, how do I show or hide a button onclick? I am making a simple mp3 player, and would like my pause button to change to a play button when clicked, and vice versa.

David Hall
  • 32,624
  • 10
  • 90
  • 127
Zack Burt
  • 8,257
  • 10
  • 53
  • 81

2 Answers2

4
play_btn.onRelease = function () {
    // do something here.. like play mp3
    play_btn._visible = false;
    pause_btn._visible = true;
}

pause_btn.onRelease = function () {
    // do something here.. like pause mp3
    play_btn._visible = true;
    pause_btn._visible = false;
}

please be remember to give the instance name of play_btn and pause_btn to the play and pause buttons

Unreality
  • 4,111
  • 11
  • 48
  • 67
-1

What I'm doing is instead creating a MovieClip and just simulating click, etc, with 4 different keyframes

Zack Burt
  • 8,257
  • 10
  • 53
  • 81