0
我不是Flash專家,但我在AS2中發現了一種方法來製作「按住按鈕」按鈕。現在我正在使用AS3,我希望將此代碼轉換爲AS3。有人可以幫忙嗎?Flash AS3按住按鈕
stop();
function startTimer(mc, conversionTime) {
mc.onEnterFrame = function() {
if ((getTimer()/1000) - conversionTime > 1) {
delete this.onEnterFrame;
gotoAndStop(3);
}
};
}
button1.onPress = function() {
var conversionTime:Number = getTimer()/1000;
startTimer(this, conversionTime);
this.onRelease = function() {
if (this.onEnterFrame != null) {
gotoAndStop(2);
}
delete this.onEnterFrame;
};
};
謝謝!
非常感謝,非常感謝!回答如此之快哇! – user1418141