Afficher un message
Vieux 06/04/2008, 12h32   #3
rlc5611
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can only set 1 variable--real weird, AS2.

Although the script in the previous post worker, I found a couple of other
issues inside the clips themselves. I recommend you edit each of the slider
clips and delete all the AS you have in those clips.

Next delete the AS you have in the two keyframes in the _root timeline.

The put the attached script in a keyframe in the main timeline. It will do all
you were doing before but it fixes two errors and it also stops running four
onEnterFrame functions when you are not moving the sliders so it will make your
SWF use less resources.

slider.handle.onPress=function(){
this.startDrag(true,0,this._parent.rail._height,0, 0);
this.onEnterFrame=function(){
this.perc=Math.round(this._y*10/this._parent.rail._height);
this._parent._parent.temp.gotoAndStop(this.perc);
}
}
slider.handle.onRelease = slider.handle.onReleaseOutside = function(){
delete this.onEnterFrame;
stopDrag();
}
sliderwet.handlewet.onPress=function(){
this.startDrag(true,0,this._parent.railwet._height ,0,0);
this.onEnterFrame=function(){
this.percwet=Math.round(this._y*10/this._parent.railwet._height);
//btw this seems backwards to me but it mimics what you had in your original
FLA
this._parent._parent.rain.gotoAndStop(11-this.percwet);
}
}
sliderwet.handlewet.onRelease = sliderwet.handlewet.onReleaseOutside =
function(){
delete this.onEnterFrame;
stopDrag();
}

  Réponse avec citation
 
Page generated in 0,06184 seconds with 9 queries