Comunidad de diseño web y desarrollo en internet online

¿Como hacer un stop a esto??

Citar            
MensajeEscrito el 19 Jun 2006 03:05 pm
Hola, tengo este codigo, alguien sabe como ponerle un stop a esto:
Tengo un boton llamado: boton_btn
Tengo un clip llamado: circulo_mc

Código :

circulo_mc._x=circulo_mc._x+5;
boton_btn.onPress=function(){
      circulo_mc.Stop();
}

Lo que quiero hacer es parar el clip CIRCULO_MC cuando presiono el boton BOTON_BTN..
alguien me puede ayudar.. gracias a todos..

Por wizardxyz

37 de clabLevel



Genero:Masculino  

Valencia - España

msie
Citar            
MensajeEscrito el 19 Jun 2006 03:17 pm
Prueba con esto:

Código :

circulo_mc.onEnterFrame = function() {
   this._x += 5;
};
boton_btn.onPress = function() {
   delete circulo_mc.onEnterFrame;
};

ciao

Por Zguillez

BOFH

10744 de clabLevel

85 tutoriales
17 articulos
3 ejemplos

Genero:Masculino   Bastard Operators From Hell Héroes Team Cristalab Editores

BCN

firefox
Citar            
MensajeEscrito el 19 Jun 2006 03:26 pm
Hola!!

No entiendo bien como quieres parar el movieclip porque con el código que tienes:

Código :

circulo_mc._x=circulo_mc._x+5;
boton_btn.onPress=function(){
      circulo_mc.Stop();
}


al ejecutar el swf, el movieclip ya se habrá movido. De todas formas cambia la linea del stop por esto:

Código :

circulo_mc.stop();


el stop va en minúscula.

Suerte. :)

Por portavoz

23 de clabLevel



Genero:Masculino  

Galicia

msie
Citar            
MensajeEscrito el 19 Jun 2006 04:35 pm
Gracias por su ayuda.. ya logre parar mi movieclip, pero le he aumentado algo mas al codigo:

Código :

circulo_mc.onEnterFrame = function() {   
this._x += 5;
};
boton_btn.onPress=function(){
   if(circulo_mc._x +=5){
   delete circulo_mc.onEnterFrame;
   }
}

Yo queria ponerle un codigo para que vuelva a avanzar el movieclip cuando vuelvo a presionar el boton_btn, pero resulta ke DELETE lo que hace es borrar CIRCULO_MC.ONENTERFRRAME... y yo queria preguntar ¿ cómo hago para que vuelva a a vanzar el movielclip?mm yo pense en algo como esto::::

Código :

circulo_mc.onEnterFrame = function() {   
this._x += 5;
};
boton_btn.onPress=function(){
   if(circulo_mc._x +=5){
   delete circulo_mc.onEnterFrame;
   }else{
circulo_mc.onEnterFrame = function() {   
this._x += 5;
};
}

Veo ke asi no es como se debe hacer; cualquier ayuda vuestra me valdria.. gracias...

Por wizardxyz

37 de clabLevel



Genero:Masculino  

Valencia - España

msie
Citar            
MensajeEscrito el 19 Jun 2006 04:56 pm
A ver si esto te sirve....

Código :

mover = circulo_mc.onEnterFrame = function () {
   this._x += 5;
};
boton_btn.onPress = function() {
   if (circulo_mc.onEnterFrame) {
      delete circulo_mc.onEnterFrame;
   } else {
      circulo_mc.onEnterFrame = mover;
   }
};

Por Zguillez

BOFH

10744 de clabLevel

85 tutoriales
17 articulos
3 ejemplos

Genero:Masculino   Bastard Operators From Hell Héroes Team Cristalab Editores

BCN

firefox

 

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