Skip to content

Instantly share code, notes, and snippets.

@sunho
Last active January 23, 2018 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunho/1958f4c2b5dfa341fe245d6090a793ac to your computer and use it in GitHub Desktop.
Save sunho/1958f4c2b5dfa341fe245d6090a793ac to your computer and use it in GitHub Desktop.
button1.addEventListener(MouseEvent.CLICK, function(e:MouseEvent) {
if(button1.currentFrame == 1) {
button1.gotoAndStop(2);
} else
button1.gotoAndStop(1);
}
});
button2.addEventListener(MouseEvent.CLICK, function(e:MouseEvent) {
if(button2.currentFrame == 1) {
button2.gotoAndStop(2);
} else {
button2.gotoAndStop(1);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment