Comunidad de diseño web y desarrollo en internet online

Problema con this

Citar            
MensajeEscrito el 12 Oct 2008 09:47 pm
Hola a todos. Me gustaría que alguien me indicara que hago mal. Quiero que varios clips cambien de posición (cada uno a una diferente) pero me van todos al mismo sitio. Este es el código

clip1.onRelease=function(){
if (sorteo>0){
i=1;
while (i<=5){
trace(coorx[i]);
_root["clip"+i].roza=2+random(10);
_root["clip"+i].onEnterFrame=function(){
with(this){
_x+=(coorx[i+1]-this._x)/this.roza;
_y+=(coory[i+1]-this._y)/this.roza;
}// with
}// function
i++
}//while
}// if
_root.gotoAndPlay(3);
}// function onRelease

Gracias

Por Brown040

0 de clabLevel



 

msie7
Citar            
MensajeEscrito el 13 Oct 2008 09:39 am
No uses with, usa this._x = ..... y this._y=.....

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

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