Ciao a tutti mi sto incartando

ho un semplicissimo menu composto da un testo che appare se si attiva il relativo cubo 3D

il tutto funziona perfettamente con questo script

codice:
onClipEvent(load){
	// var controllo movimento, scalatura, rotazione
	mov=false
	giu=false
	mystop=false
	myparent="txt"+substring(_name,5,1);
}

onClipEvent(mouseMove){
	if(this.hitTest(_root._xmouse,_root._ymouse,false)){
		mov=true; _root[myparent].nextFrame()
	}else{
		mov=false;
	}
}

onClipEvent(mouseDown){
	if(this.hitTest(_root._xmouse,_root._ymouse,false)){
		click=true;
	}else{
	    click=false;
	}
}

onClipEvent(enterFrame){
//---------------------

if(mov){
	if(giu){
    	if(_xscale>10){_yscale=_xscale-=5;_rotation+=10;_y-=5;_x-=5}
		else{giu=false}
	}
	if(!giu){
    	if(_xscale<50){_yscale=_xscale+=5;_rotation-=10;_y+=5;_x+=5}
		else{giu=true}
	}
}
if(mystop){
	    if(_xscale>10){_yscale=_xscale-=5;_rotation+=10;_y-=5;_x-=5}
		else{mystop=false;_root[myparent].prevFrame()}
	}
}

sto tentando di creare un ciclo FOR per l'assegnazione degli eventi di cui sopra, affinchè non debba ripetere tutte le AS su ogni cubo

ma il seguente script NON FUNZIONA ?? mi aiutereste a capire dov'è che TOPPO

codice:
for(i=1; i<=3; i++){
	nome="cubo"+i
	_root[nome].onLoad=function(){
		mov=false
		giu=false
		mystop=false
		myparent="txt"+substring(_name,5,1);
	}

	_root[nome].onMouseMove=function(){
		if(this.hitTest(_root._xmouse,_root._ymouse,false)){
			mov=true; _root[myparent].nextFrame()
		}else{
			mov=false;
		}
	}
	_root[nome].onMouseDown=function(){
		if(this.hitTest(_root._xmouse,_root._ymouse,false)){
			click=true;
		}else{
		    click=false;
		}
	}

_root[nome].onEnterFrame=function(){
		if(this.mov){
			if(this.giu){
		    	if(this._xscale>10){this._yscale=_xscale-=5;this._rotation+=10;this._y-=5;this._x-=5}
				else{this.giu=false}
			}
			if(!this.giu){
    			if(this._xscale<50){this._yscale=this._xscale+=5;this._rotation-=10;this._y+=5;this._x+=5}
				else{giu=true}
			}
		}
		if(this.mystop){
	    	if(this._xscale>10){this._yscale=this._xscale-=5;this._rotation+=10;this._y-=5;this._x-=5}
			else{this.mystop=false;_root[myparent].prevFrame()}
		}
}
}//end For

Grazie