Funções e acções para colocar num botão anterior e seguinte (frame seguinte, frame anterior)
1. criar um botão (texto a dizer anterior >> converter em symbol - button - e atribuir à Instance Name o nome ir_ant - a inatnce Name encontra-se nas Properties)
2. Repetir para criar um botão seguinte
3. Copiar o código em baixo para as Actions
stop();
//funções - as actions "função" existem uma só vez no filme
function irAnt(event:MouseEvent):void
{
prevFrame();
}
function irSeg(event:MouseEvent):void
{
nextFrame();
}
//acções botão - as actions "evento" tem que ser existir em cada cena onde existir o botão
ir_ant.addEventListener(MouseEvent.CLICK, irAnt);
ir_seg.addEventListener(MouseEvent.CLICK, irSeg);
Sem comentários:
Enviar um comentário