crea un fla nuovo
costruisci una pallina ed istanziala pallina
codice:
for (I=1;I<=5;I++){
this.createEmptyMovieClip("menu"+I,I)
this["menu"+I].createTextField("testo",1,100*I-100,0,100,20)
this["menu"+I].X=100*I-100
this["menu"+I].testo.text="Opzione"+I
this["menu"+I].onPress=function(){
this._parent.muovi(this.X)
}
}
function muovi(newX){
trace(newX)
pallina.posX=newX
pallina.onEnterFrame=function(){
this.oldX=this.X
this.X=this.posX - this._x
this._x+=this.X/3
if(this.oldX==this.X){
this._x=this.posX
delete this.onEnterFrame
}
}
}
Capito il concetto è semplice
Ciao