Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/04/2007, 08:15
perax
 
Fecha de Ingreso: marzo-2007
Mensajes: 11
Antigüedad: 17 años
Puntos: 0
Problemas con un cargador de sonido

Hola tengo hecho en flash un .swf para mi pagina con la unica funcion de que que loopee 3 temas... Funciona bien.. hasta que se va a alguno de los links .. ahi funciona pero hay que apretar el boton play para que vuelva a hacerlo .. es como que cuando se va a otra seccion o otra pagina el cargador se pone en stop... esto solo pasa en internet explorer ya que en mozilla todo va muy bien...

dejo el codigo as del swf, tal vez sirva de ayuda.. gracias muchas gracias!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


------------------------------------------------------------

//
//SONIDO
//
var can_num:Number = 1;
var sonido:Sound = new Sound();
vol_bot.onPress = function () {
this.startDrag(0, linea._x, linea._y, linea._x+100, linea._y);
this.onEnterFrame = function () {
var vol = this._x-linea._x;
sonido.setVolume(vol);
}
}
vol_bot.onRelease = vol_bot.onReleaseOutside = function () {
this.stopDrag();
this.onEnterFrame = null;
}
play_bot.onRelease = function () {
stopAllSounds();
sonido.start(0, 100);
ecua.play();
}
stop_bot.onRelease = function () {
stopAllSounds();
ecua.gotoAndStop(1);
}
fw_bot.onRelease = function () {
cargar_sonido(1);
}
back_bot.onRelease = function () {
cargar_sonido(0);
}
var cargar_sonido:Function = function (dir) {
stopAllSounds();
ecua.gotoAndStop(1);
if(dir && can_num<3)can_num++;
else if(dir && can_num==3)can_num = 1;
else if(!dir && can_num>1)can_num--;
else can_num = 3;
sonido.loadSound("sonido/"+can_num+".mp3", false);
sonido.setVolume(vol_bot._x-linea._x);
sonido.onLoad = function (ok) {
if(ok)this.start(0, 100), ecua.play();
}
}
cargar_sonido(1);
//


------------------------------------------------------------