| Autor | Zpráva | ||
|---|---|---|---|
| ghost Profil * |
#1 · Zasláno: 28. 4. 2011, 16:13:05
čaudy, mám movieClip o cca 60 framech a potřeboval bych pomocí posuvníku přejíždět mezi jednotlivými framy, zkoušel jsem to nějak takto, ale zatím bez uspěchu:
onClipEvent (enterFrame) {
this._currentframe=_root.slider.poziceslider._currentframe;
} |
||
| flz Profil |
#2 · Zasláno: 29. 4. 2011, 06:42:19
beginigFrame = 1;
endingFrame = this._totalframes;
movieClipToEffect = this;
progresBarBcg.onPress = function() {
movieControl(progresBarBcg._xmouse/this._width,"stop",movieClipToEffect,beginigFrame,endingFrame)
this.onMouseMove = function() {
movieControl(progresBarBcg._xmouse/this._width,"stop",movieClipToEffect,beginigFrame,endingFrame)
};
};
progresBarBcg.onRelease = function() {
movieControl(progresBarBcg._xmouse/this._width,"play",movieClipToEffect,beginigFrame,endingFrame)
this.onMouseMove = null
};
progresBarBcg.onReleaseOutside = function() {
movieControl(progresBarBcg._xmouse/this._width,"play",movieClipToEffect,beginigFrame,endingFrame)
this.onMouseMove = null
};
movieControl = function(percPos,playOrStop,targetMC,begFrame,endFrame){
difFrames = endFrame - begFrame
framePosition = Math.round(difFrames*percPos)
if(framePosition < beginigFrame){
framePosition = beginigFrame
}
if(playOrStop == "stop"){
targetMC.gotoAndStop(framePosition)
}
if(playOrStop == "play"){
targetMC.gotoAndPlay(framePosition)
}
}do scény vlož MC s Instance Name "progresBarBcg", tento MC by mal byť obdĺžnik (napr 15×200px) ktorého obsah musí byť zarovnaný na súradnice [0,0] skript prerátáva súradnicu _x pri kliknutí na "progresBarBcg" na číslo framu MC |
||
|
Časová prodleva: 14 let
|
|||
0