myBtn.onRelease = function() {
timer2 = getTimer();
trace(timer2-timer);
if (timer2-timer<200) {
trace("短按");
} else {
trace("长按");
}
};
myBtn.onPress = function() {
timer = getTimer();
};
[From 阿修的部落格]
timer2 = getTimer();
trace(timer2-timer);
if (timer2-timer<200) {
trace("短按");
} else {
trace("长按");
}
};
myBtn.onPress = function() {
timer = getTimer();
};
[From 阿修的部落格]