私はFlashの専門家ではありませんが、AS2で「長押し」ボタンを作成する方法を見つけました。現在、AS3を使用しており、このコードを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;
};
};
ありがとう !