Skip to content

Instantly share code, notes, and snippets.

@sunho
Last active January 23, 2018 00:42
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/9404b812c67925a031ab3c07719b9e6d to your computer and use it in GitHub Desktop.
Save sunho/9404b812c67925a031ab3c07719b9e6d to your computer and use it in GitHub Desktop.
function click(e:MouseEvent) {
if(e.target.currentFrame == 1) {
e.target.gotoAndStop(2);
} else {
e.target.gotoAndStop(1);
}
}
button1.addEventListener(MouseEvent.CLICK,click);
button2.addEventListener(MouseEvent.CLICK,click);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment