Comunidad de diseño web y desarrollo en internet online

varios botoens as3

Citar            
MensajeEscrito el 26 Dic 2008 12:57 pm
bueno mi problema es el sigueinte creo un bonton y que al darle click me lleva a determinado frame de mi presentacion
ahora viene el problema que no he podido creo otro boton que me lleve a otro frame diferente y lo hace pero el tercero no he podido se eqeuda en lo que me meustra el segundo frame.

este es el codigo que escribi se que me falta pero no se por donde seguir?
quiereo que cada boton me elleve a una animacion o presentacion diferente sobre mi linea de tiempo

stop();
import flash.events.*;

this.btn1.addEventListener(MouseEvent.CLICK, miFuncion);
this.btn2.addEventListener(MouseEvent.CLICK, miFuncion);
this.btn3.addEventListener(MouseEvent.CLICK, miFuncion);

function miFuncion(event:MouseEvent):void

{

this.gotoAndPlay(10)

}

Por juanzear

36 de clabLevel



 

msie7
Citar            
MensajeEscrito el 26 Dic 2008 02:40 pm
Todos están yendo al mismo frame, es decir al 10. Usa funciones distintas para cada botón

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 26 Dic 2008 02:47 pm
jorge muchas gracias si de eso me doy cuenta pero no se como cambiar la funcion.
this.btn1.addEventListener(MouseEvent.CLICK, miFuncion); seria cambiarla por esta
this.btn1.addEventListener(MouseEvent.CLICK, this.gotoAndPlay(10));
this.btn2.addEventListener(MouseEvent.CLICK, this.gotoAndPlay(20));

o como si me puedes ayudar te lo agradeceria yo soy diseñador y admiro a los programdores pero lo mio es una simple preseentacion y quiero usar cs4 y as3 no se emucho

gracias

Por juanzear

36 de clabLevel



 

msie7
Citar            
MensajeEscrito el 26 Dic 2008 03:06 pm
Prueba por ejemplo:

Código ActionScript :

this.btn2.addEventListener(MouseEvent.CLICK, miFuncion2);
function miFuncion(event:MouseEvent):void
{
    this.gotoAndPlay(20)
} 


Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 26 Dic 2008 03:20 pm
gracias jorge este script creo que nos va a servir a mas de uno me quedo de esta forma y funciona al pelo
creeo que as3 es la gloria para los programadores para nsotros los diseñadores un poco dificil pero con logica y prueba y error aprendemos

stop();
import flash.events.*;

this.btn1.addEventListener(MouseEvent.CLICK, miFuncion);
this.btn2.addEventListener(MouseEvent.CLICK, miFuncion2);
this.btn3.addEventListener(MouseEvent.CLICK, miFuncion3);

function miFuncion(event:MouseEvent):void{
this.gotoAndPlay(2)
}
function miFuncion2(event:MouseEvent):void{
this.gotoAndPlay(10)
}
function miFuncion3(event:MouseEvent):void
{

this.gotoAndPlay(20)

}

Por juanzear

36 de clabLevel



 

msie7

 

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