Este es el código
Código :
stop();
function cargar_mp3(mp3) {
cancion = new Sound();
cancion.loadSound(mp3, true);
this.onEnterFrame = function() {
BytesLoaded = cancion.getBytesLoaded();
BytesTotal = cancion.getBytesTotal();
porcentaje = Math.floor(BytesLoaded/BytesTotal*100);
if (!isNaN(porcentaje)) {
estado.text = porcentaje+"% cargado.";
}
};
cancion.onLoad = function() {
delete onEnterFrame;
estado.text = "carga completa";
};
}
cargar_mp3 = FlashVars ("mp3=http://www.dominio.com/portafolio/$audio");
b_pause.onRelease = function() {
ultimaPosicion = Math.round(cancion.position/1000);
cancion.stop();
};
b_stop.onRelease = function() {
ultimaPosicion = 0;
cancion.stop();
};
b_play.onRelease = function() {
if (ultimaPosicion == 0) {
cancion.start();
} else {
cancion.start(ultimaPosicion);
}
};
al cargarlo de esta forma funciona perfecto
cargar_mp3 ("http://www.dominio.com/portafolio/audio.mp3");
Pero si lo intento jañar por medio de variable... no funciona
cargar_mp3 = FlashVars ("mp3=http://www.dominio.com/portafolio/$audio");
Por favor necesito ayuda...
