Comunidad de diseño web y desarrollo en internet online

moverse en linea de tiempo an as3

Citar            
MensajeEscrito el 09 Jul 2009 04:55 pm
Hola
Estoy iniciando en as3 y tengo el siguiente problema:
Necesito moverme en dos fotogramas ir y regresar, para lo cual pongo el siguiente código:
Tengo dos botones (ir y regresar)


stop();


import flash.events.*;
ir.addEventListener(MouseEvent.CLICK, miFuncion);
function miFuncion(event:MouseEvent):void
{
gotoAndStop(2);
}


Pero no se como hacer para que regrese al fotograma 1 con el boton regresar; cuando repito el codigo me sale un error

Por williamgomezg

0 de clabLevel



 

msie7
Citar            
MensajeEscrito el 09 Jul 2009 05:17 pm
Usa algo así:

Código ActionScript :

function miFuncion(event:MouseEvent):void{
   gotoAndStop(this.currentframe==1)?2:1;
}


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.