Foros del Web » Creando para Internet » Flash y Actionscript »

Autoplay MP3 Player - Componete

Estas en el tema de Autoplay MP3 Player - Componete en el foro de Flash y Actionscript en Foros del Web. Hola! Tengo un componente de flash para reproducir mp3, pero necesito que haga autoplay (pide presionar play cuando carga) y que cuando termine una cancion ...
  #1 (permalink)  
Antiguo 31/05/2009, 23:11
Avatar de ss007  
Fecha de Ingreso: marzo-2002
Mensajes: 205
Antigüedad: 22 años, 1 mes
Puntos: 0
Autoplay MP3 Player - Componete

Hola! Tengo un componente de flash para reproducir mp3, pero necesito que haga autoplay (pide presionar play cuando carga) y que cuando termine una cancion siga con la otra y asi sucesivamente hasta que cuando llegue a la ultima vuelva a la primera.

Buscando encontre en este foro una respuesta http://www.forosdelweb.com/f16/miren...codigo-148338/, pero no me funciona...

La verdad se muy poco sobre AS, quizas esté haciendo algo mal...

Les dejo el codigo:

Código:
AudioXml = new XML();
AudioXml.ignoreWhite = true;
AudioXml.onLoad = LoadXmlFile;
AudioXml.load(playListPath);
function LoadXmlFile(success) {
    if (success) {
        aPath = new Array();
        asongTitle = new Array();
        aAudio = new Array();
        aAudio = this.firstChild.childNodes;
        AudioTotal = aAudio.length;
        for (i=0; i<AudioTotal; i++) {
            if (aAudio[i].nodeName == "AudioProps") {
                aPath.push(aAudio[i].attributes.path);
                asongTitle.push(aAudio[i].attributes.songTitle);
            }
        }
        AudioPath = aPath[0];
        tAuthor = asongTitle[0];
        AudioActual = 1;
        tCount = AudioActual+" Of "+AudioTotal;
        tText = "Reproductor";
    } else {
        tText = "No se puede cargar sonidos";
    }
}
Ff.onPress = function() {
    if (AudioActual<AudioTotal) {
        AudioActual += 1;
        AudioPath = aPath[AudioActual-1];
        tAuthor = asongTitle[AudioActual-1];
        MySound.stop();
        Mystatus = "Presione Play";
    }
};
Rw.onPress = function() {
    if (AudioActual>1) {
        AudioActual -= 1;
        AudioPath = aPath[AudioActual-1];
        tAuthor = aSongTitle[AudioActual-1];
        MySound.stop();
        Mystatus = "Press Play";
    }
};
PlayBtn.onPress = function() {
    if (FlagPausa == true) {
        MySound.start(SoundPausePos, 0);
        FlagPausa = false;
        SoundPausePos = undefined;
    } else {
        MySound = new Sound();
        volume = 100;
        MySound.setVolume(volume);
        MySound.loadSound(AudioPath, StreamFlag);
        FlagPausa = false;
        _parent.onEnterFrame = function() {
            TB = MySound.getBytesTotal();
            BL = MySound.getBytesLoaded();
            if (BL != TB) {
                TheText2.text = Math.round((BL/TB)*100)+"% Cargando";
            } else {
                TheText2.text = "Tema Cargado";
                delete _parent.onEnterFrame;
                MySound.start();
            }
        };
    }
};
StopBtn.onPress = function() {
    MySound.stop();
    Mystatus = "Precione Play";
};
PauseBtn.onPress = function() {
    SoundPausePos = MySound.position/1000;
    MySound.stop();
    FlagPausa = true;
};
volUp.onPress = function() {
    if (volume == 100) {
        volume = 100;
    } else {
        volume += 10;
        MySound.setVolume(volume);
    }
};
volDown.onPress = function() {
    if (volume == 0) {
        volume = 0;
    } else {
        volume -= 10;
        MySound.setVolume(volume);
    }
};
Gracias
__________________
MonaS

Última edición por ss007; 01/06/2009 a las 00:07
  #2 (permalink)  
Antiguo 01/06/2009, 10:30
Avatar de ss007  
Fecha de Ingreso: marzo-2002
Mensajes: 205
Antigüedad: 22 años, 1 mes
Puntos: 0
Respuesta: Autoplay MP3 Player - Componete

Por favor AYUUUUDAAAA !!!!!!!!

Gracias
__________________
MonaS
  #3 (permalink)  
Antiguo 01/06/2009, 22:28
Avatar de ss007  
Fecha de Ingreso: marzo-2002
Mensajes: 205
Antigüedad: 22 años, 1 mes
Puntos: 0
Respuesta: Autoplay MP3 Player - Componete

Nadie??? Nadie??? que pueda echarme una mano???
__________________
MonaS
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:53.