ムービークリップのタイムラインをスクラブ/コントロールするスライダー(およびボタン)のコードはありますが、これをアクションスクリプト3に変換する方法は失われています。 感謝。代わりに、誰かがこの機能のas3の例を知っていますか?ここアクションスクリプトタイムラインスクラバー/ AS3に変換
はコードです:
controller = this;
startR = timeline._x;
endR = startR + timeline._width;
Range = endR-startR;
playSpeed = 0;
slider.onPress = function(){
var offset = this._x - this._parent._xmouse;
this.onMouseMove = function(){
this._x = Math.min(Math.max(startR, this._parent._xmouse + offset), endR);
var percent = (this._x-startR)/Range;
target.gotoAndStop(Math.floor(percent*target._totalframes)+1)
updateAfterEvent();
}
this.onMouseMove();
}
slider.onRelease = slider.onReleaseOutside = function(){
delete this.onMouseMove;
if (playSpeed == 1) target.play()
}
this.onEnterFrame = function(){
if (!slider.onMouseMove){
if (playSpeed != 1) target.gotoAndPLay(Math.round(target._currentframe+playSpeed));
// playSpeed of 1 is handled with play() so that synced audio can play
if (target._currentframe == target._totalframes) playSpeed = 0;
var percent = (target._currentframe-1)/(target._totalframes-1);
slider._x = startR + Range*percent;
}
}
// Buttons
start_btn.onRelease = function(){
playSpeed = 0;
target.gotoAndStop(1);
}
rw_btn.onPress = function(){
this.orig = playSpeed;
playSpeed = -2;
}
rw_btn.onRelease = rw_btn.onReleaseOutside = function(){
playSpeed = this.orig;
if (playSpeed == 1) target.play();
}
stop_btn.onRelease = function(){
playSpeed = -1;
}
play_btn.onRelease = function(){
playSpeed = 1;
target.play();
}
ff_btn.onPress = function(){
this.orig = playSpeed;
playSpeed = 2;
}
ff_btn.onRelease = rw_btn.onReleaseOutside = function(){
playSpeed = this.orig;
if (playSpeed == 1) target.play();
}
end_btn.onRelease = function(){
playSpeed = 0;
target.gotoAndStop(target._totalframes);
}
これが彼の空き時間にそれを行うために誰かのために複雑に道であれば、 は多分誰かはもちろん支払った、AS3に私のために、この機能を作成するに興味がありますか?相続人は、事前に
おかげで、 記号論的
あなたがゼロから1を作るのではなく – Ronnie