Ciao a tutti io ho creato questo scroll automatico per un menù.
onClipEvent (load) {
speed = 20;
// Maggiore è il valore, minore è la velocità
Stage.scaleMode = "noScale";
w = Stage.height;
boundsStage = _parent.bordi.getBounds(_root);
}
onClipEvent (enterFrame) {
boundsSlide = this.getBounds(_root);
ymouse = _level0._ymouse;
move = -(ymouse-(w/2))/speed;
if ((boundsSlide.yMax<boundsStage.yMax) && (ymouse>(w/2))) {
move = 0;
} else if ((boundsSlide.yMin>boundsStage.yMin) && (ymouse<(w/2))) {
move = 0;
}
this._y += move;
}
Non riesco però a capire come fare per dirgli di funzionare solo quando il mouse gli si trova sopra e far si non che si muova quando il mouse si sposta nello stage cioè al di fuori del rettangolo prestabilito...