Comunidad de diseño web y desarrollo en internet online

porque no me sirve este codigo para qe un mc siga a otro?

Citar            
MensajeEscrito el 20 Sep 2010 12:32 am
el codigo es este

Código ActionScript :

onClipEvent (load) { 

_x = 0; 

_y = 0; 

velocidad = 20; 

} 

onClipEvent (enterFrame) { 

posicionX = this.mcPlayer1X
posicionY = this.mcPlayer1Y 

_x += (posicionX - _x)/velocidad; 

_y += (posicionY - _y)/velocidad; 

} 


lo puse sobre el MC qe qiero qe siga a el MC qe tiene nombre de instansia de mcPlayer1 el cual controlo con el teclado

Por Nato_Kohanim

160 de clabLevel



Genero:Masculino  

Editor, Programador y Bloggero

chrome
Citar            
MensajeEscrito el 20 Sep 2010 01:41 am

Código ActionScript :

onClipEvent (load) {  
_x = 0;  
_y = 0;  
velocidad = 20;  
}  
 
onClipEvent (enterFrame) {  
posicionX = _root.mcPlayer1._x; 
posicionY = _root.mcPlayer1._y; 
_x += (posicionX - _x)/velocidad;  
_y += (posicionY - _y)/velocidad;  
}

Por tribak

Claber

2448 de clabLevel

6 tutoriales

Genero:Masculino   Héroes

Fotógrafo o algo

firefox
Citar            
MensajeEscrito el 20 Sep 2010 03:45 am

tribak escribió:

Código ActionScript :

onClipEvent (load) {  
_x = 0;  
_y = 0;  
velocidad = 20;  
}  
 
onClipEvent (enterFrame) {  
posicionX = _root.mcPlayer1._x; 
posicionY = _root.mcPlayer1._y; 
_x += (posicionX - _x)/velocidad;  
_y += (posicionY - _y)/velocidad;  
}


gracias.. que frialdad la tuya, pero gracias n_n

Por Nato_Kohanim

160 de clabLevel



Genero:Masculino  

Editor, Programador y Bloggero

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.