Last active
November 20, 2018 05:12
-
-
Save tanegame/7a9e804ca2c4423d2f6b5aca8ae0cbe6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//スマホ対応 | |
if (createjs.Touch.isSupported()) { | |
createjs.Touch.enable(stage, true); | |
} | |
this.gotoAndStop("standby"); //"standby"のフレームに移動 | |
var _this = this; | |
//------------------ ここから鍵盤のコード ---------------------- | |
//01 k_c | |
_this.keyboard.k_c.addEventListener("mousedown",onKey_c); | |
function onKey_c(evt){ | |
_this.keyboard.k_c.gotoAndPlay("on"); | |
_this.gotoAndPlay("3c"); | |
} | |
//02 k_cs | |
_this.keyboard.k_cs.addEventListener("mousedown",onKey_cs); | |
function onKey_cs(evt){ | |
_this.keyboard.k_cs.gotoAndPlay("on"); | |
_this.gotoAndPlay("3cs"); | |
} | |
//03 k_d | |
_this.keyboard.k_d.addEventListener("mousedown",onKey_d); | |
function onKey_d(evt){ | |
_this.keyboard.k_d.gotoAndPlay("on"); | |
_this.gotoAndPlay("3d"); | |
} | |
//---- 以下略 ---- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment