2012年1月12日 星期四

AutoHotKey note

隨手記~~
hotkeys:快捷鍵
^::ctrl
!::alt
#::win

ie:
^!n::ctrl+alt+n
#z::win+z

flashpunk LinearMotion usage

幾個地方要注意
// auto remove when it has finished
var myTween = new LinearMotion(null, Tween.ONESHOT);

// auto stop and run myComplete when is has finished
var myTween = new LinearMotion(myComplete);

myTween.setMotion(to_x, 340, to_x, 300, 0.5, Ease.quadOut);

// don't start immediately
addTween(myTween, false);

you can check myTween.active in update().
完整範例如下:

flashpunk tips

// debug 超好用呀~~
// press ~ : toggle the debug Console on/off.
FP.console.enable();

// global objects
FP.stage
FP.width
FP.height
FP.halfWidth
FP.halfHeight