Comunidad de diseño web y desarrollo en internet online

abrir y cerrar compuertas.

Citar            
MensajeEscrito el 07 Nov 2009 05:52 pm
El problema es algo facil ehhh .

tengo una pequeña "firma" que tiene una foto y quiero que haya por encima unas puertas que cuando se haga click en un boton se habran y se cierren .

tengo hecha la animacion cuando las compuertas se habren .

es un movie clip simlpe vaya .

y el boton con un :

on realse

on (press){
gotoAndPlay("2");
}

Pero claro ahora quiero que cuando VUELVA A HACER CLICK EN ESE BOTON.

el movie clip se lea al revez y que se cierren las compuertas QUE ES LO QUE NO SE .

Como reproducir ese movieclip al revez .

Si alguine me puede ayudar, se lo agradezco :)

Por Sepultura

60 de clabLevel



 

www.cultosiniestro.com.ar

firefox
Citar            
MensajeEscrito el 07 Nov 2009 07:50 pm
hay de dos:

ó haces la animacion de abrir y cerrar y con botones en diferentes frames haces la instruccion, ó algo mas facil es:
en el primer frame de tu animcion pon:

Código ActionScript :

this.onEnterFrame = function(){
  if(atras){
   this.prevFrame()
  }
}

en tu boton pon:

Código ActionScript :

on (press){
atras=false;
gotoAndPlay("2");
}

y otro boton con la instruccion:

Código ActionScript :

on (press){
atras=true;
gotoAndPlay("2");
}

EXPLICACION: Cuando la variable atras es true entonces hace la funcion prevFrame() que lo que hace es retroceder un frame... pero al estar en un enterFrame lo hara continuamente.

saludos.
http://www.miactionscript.com/

[BOFH]Cuando escribas código en ActionScript, colócalo entre las etiquetas [*as] y [*/as] (sin los asteriscos) para que sea más legible. The Fricky![/BOFH]

Por MiactionScript

77 de clabLevel



 

msie7
Citar            
MensajeEscrito el 07 Nov 2009 07:52 pm
perdon me equivoque en tu segundo boton basta poner:

on (press){
atras=true;
}

sin el gotoAnd...

Por MiactionScript

77 de clabLevel



 

msie7
Citar            
MensajeEscrito el 08 Nov 2009 01:48 pm
muchisimas gracias miAction :)

Por Sepultura

60 de clabLevel



 

www.cultosiniestro.com.ar

firefox

 

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