Skip to content

Instantly share code, notes, and snippets.

@tanegame
tanegame / html5canvas-test.js
Created November 9, 2018 14:34
Animate CC : HTML5 Canvas でパブリッシュしてiOSで mousedown を使うためのjsコード
if (createjs.Touch.isSupported()) {
createjs.Touch.enable(stage, true);
}
//スマホ対応
if (createjs.Touch.isSupported()) {
createjs.Touch.enable(stage, true);
}
var _this = this; //thisを変数に代入
_this.stop(); //再生を止める
_this.btn.addEventListener("click", btnClick); //イベントリスナーを設置
this.gotoAndStop("a"); //フレーム移動
this.gotoAndStop("standby");
//スマホ対応
if (createjs.Touch.isSupported()) {
createjs.Touch.enable(stage, true);
}
this.gotoAndStop("standby"); //"standby"のフレームに移動
var _this = this;
//キーのインスタンス名の配列
//スマホ対応
if (createjs.Touch.isSupported()) {
createjs.Touch.enable(stage, true);
}
this.gotoAndStop("standby"); //"standby"のフレームに移動
var _this = this;
//------------------ ここから鍵盤のコード ----------------------