隨手記~~
hotkeys:快捷鍵
^::ctrl
!::alt
#::win
ie:
^!n::ctrl+alt+n
#z::win+z
2012年1月12日 星期四
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().
完整範例如下:
// 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
// press ~ : toggle the debug Console on/off.
FP.console.enable();
// global objects
FP.stage
FP.width
FP.height
FP.halfWidth
FP.halfHeight
訂閱:
文章 (Atom)