Skip to content

Instantly share code, notes, and snippets.

@tanegame
Last active November 14, 2018 02:30
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 tanegame/6dbe1304219806c435c1e3b630950ec8 to your computer and use it in GitHub Desktop.
Save tanegame/6dbe1304219806c435c1e3b630950ec8 to your computer and use it in GitHub Desktop.
//スマホ対応
if (createjs.Touch.isSupported()) {
createjs.Touch.enable(stage, true);
}
var _this = this; //thisを変数に代入
_this.stop(); //再生を止める
_this.btn.addEventListener("click", btnClick); //イベントリスナーを設置
function btnClick(evt) {
console.log("btn click"); //確認用
evt.remove(); //リスナーを外す
_this.gotoAndPlay("do"); //フレーム移動
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment