//primero cargo 2 canciones dentro de flash
_root.createEmptyMovieClip("soundLib", 1);
soundLib.createEmptyMovieClip("holder_1", 1);
sound_1=new Sound(soundLib.sound_1);
soundLib.createEmptyMovieClip("holder_2", 2);
sound_2=new Sound(soundLib.sound_2);
sound_1.loadSound("/orquestra/song5.mp3", false);
function progressLoad_1(){
var porsentaje=(sound_1.getBytesLoaded()/sound_1.getBytesTotal())*100;
cargado_1.text=Math.round(porsentaje)+" %";
}
checkprogress=setInterval(progressLoad_1, 1000);
sound_2.loadSound("/orquestra/song2.mp3", false);
function progressLoad_2(){
var porsentaje=(sound_2.getBytesLoaded()/sound_2.getBytesTotal())*100;
cargado_2.text=Math.round(porsentaje)+" %";
}
checkprogress=setInterval(progressLoad_2, 1000);
ME CARGA TODO SIN ERROR, LUEGO
HAY 2 BOTONES PARA SELECCIONAR UNA DE LAS 2 CANCIONES.[/b] (hay mas pero quiero entende donde esta el error)
seleccionar_cancion1.onRelease=function(){
//si aprieta este boton seleccionatara cancion 1 que corresponde a sound_1
tema.text="sound_1";
}
seleccionar_cancion2.onRelease=function(){
//si aprieta este boton seleccionatara cancion 2 que corresponde a sound_2
tema.text="sound_2";
AHORA TENGO 2 BOTONES SAUND START Y SOUND STOP
sound_start.onRelease=function()
{
//recojo opcion de cancion que elejio el usuario
var tema1=tema.text;
trace(tema1);
tema1.start(0,1);
}
sound_stop.onRelease=function()
{
var tema1=tema.text;
trace(tema1);
tema1.stop();
}
funcion trace() escribe opcion elejida de forma correcta pero el sonido no se reproduce. SI pongo en lugar de tema1.start(0,1); sound_1.start(0,1); o sound_2.start(0,1); si reproduce.
No entiendo porque no lee variable tema1.
Gracias por auyda y por vuesta estupenda web.[/b]
