Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2011, 22:58
magux3000
 
Fecha de Ingreso: marzo-2011
Mensajes: 1
Antigüedad: 13 años, 1 mes
Puntos: 0
Problema al cargar audio en archivo .exe

Mi situación es la siguiente, tengo un minireproductor en un archivo de flash por un proyecto que estoy haciendo, la cosa es que dentro de Flash, el audio se reproduce correctamente (con Ctrl+Enter) pero si publico ya sea en .swf o en .exe el audio no se reproduce, el reproductor es sencillo, solo tiene que reproducir una canción al darle play y pausarla cuando se presione el botón correspondiente.

este es el código que tengo:

Cita:
var mcPath:MovieClip = this;
var timer:Number = 0;
var wTime:Number = mcTime._width;

var music:Sound = new Sound();
music.loadSound("sound.mp3", false);
music.onLoad = function() {
startProgress();
btPlay.enabled = true;
}
music.onSoundComplete = function() {
timer = 0;
btPlay._visible = true;
stopProgress();
}
function startProgress() {
delete mcPath.onEnterFrame;
mcPath.onEnterFrame = function() {
txtTime.text = "TIME: "+music.position+" / "+music.duration;
mcTime._width = wTime*(music.position/music.duration);
}
}
function stopProgress() {
delete mcPath.onEnterFrame;
}
btPlay.enabled = false;
btPlay.onRelease = function() {
music.start(timer/1000);
startProgress();
btPlay._visible = false;
}
btPause.onRelease = function() {
timer = music.position;
music.stop()
stopProgress();
btPlay._visible = true;
}
De antemano muchas gracias (: