Ciao a tutti, ho trovato una funzione che muove dei thumb e ne definisce i limiti a sinistra/destra. Vorrei che il limite a sinistra invece che arrivare a 0, l'angolo a sinistra dello stage, arrivasse a 180.
Non sono un programmatore flash, deve essere banale ma non riesco, qualcuno sa aiutarmi?codice:function moveScrollerThumbs(e:Event):void { if ( mouseY > scroller.y && mouseY < scroller.y + scroller.height) {//vertically over scroller if (mouseX < stage.stageWidth/2 - padding*2 && mouseX > 0) {//left of stage explicitly speed = -(mouseX - (stage.stageWidth/2 - padding*2)) / 8; } else if (mouseX > stage.stageWidth/2 + padding*2 && mouseX < stage.stageWidth) {//right of stage explicitly speed = -(mouseX - (stage.stageWidth/2 + padding*2)) / 8; } else { speed = 0; } scroller.x += speed; //scroller limits if (scroller.x < -scroller.width + stage.stageWidth - padding) { //if scrolled too far left scroller.x = -scroller.width + stage.stageWidth - padding; } else if (scroller.x > padding) { //if scrolled to far right scroller.x = padding; } } }

Rispondi quotando