Código ActionScript :
//Button btnParar;
//DECLARAÇÕES E INICIALIZAÇÕES
stop();
var som:Sound = new Sound();
som.load( new URLRequest("vampire.mp3") );
var canal:SoundChannel;
// OUVIDORES DE EVENTOS
som.addEventListener( Event.COMPLETE, carregaMusicas_COMPLETE );
btnVoltar.addEventListener(MouseEvent.CLICK, btnVoltar_CLICK );
addEventListener( Event.ENTER_FRAME, verificarPosicao );
// FUNÇÕES DE EVENTO
function carregaMusicas_COMPLETE ( evento:Event ):void
{
tocarMusicas();
play();
}
// FUNÇÕES
function tocarMusicas ():void
{
canal = som.play(0 , 0);
}
function verificarPosicao (evento:Event):void
{
if(currentLabel != "fim")
{
btnVoltar.visible = false;
}
else
{
btnVoltar.visible = true;
stop();
}
}
function btnVoltar_CLICK (ev:MouseEvent ):void
{
canal.stop();
gotoAndPlay(1);
}
Alguna idea de como resolver este problema? Desde ya muchas gracias.
Claudio
