← Desenvolvimento

leitor de mp3

Lida 1576 vezes

Offline

Joels 
Membro
Mensagens 115 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1 100 Posts

boas, eu gostava de saber se conhecem algum leitor de mp3 em flash, para colocar umas musicas on-line.


cumps
Offline

-RJ- 
Membro
Mensagens 1188 Gostos 0
Troféus totais: 30
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

tenta este código

Citar
//objeto que ira manipular o som
var som:Sound = new Sound();
//vetor que ira armazenar o caminho das mp3 a serem tocadas
var musicas:Array = new Array();
//declarando o resto das variaveis
var i, vol, verifica, pos:Number;
var ligado:Boolean;
var acao:String;
stop();

musicas[0] = "audio/audio1.mp3";
musicas[1] = "audio/audio2.mp3";
musicas[2] = "audio/audio3.mp3";

if (ligado==null) {
    i = 0;
    vol = 100;
    ligado = false;
}

this.onEnterFrame = function() {

    som.setVolume(vol);
   
   if (ligado==false) {
        som.loadSound(musicas, true);
      if (i<2)
            i++;
        else
            i = 0;
         
      ligado = true;
    }
   artista.text = "Artista: " + som.id3.artist;
    musica.text = "Musica: " + som.id3.songname;
   
   verifica = som.getVolume();
    if (verifica>=100) {
        som.setVolume(100);
    }
    if (verifica<=0) {
        som.setVolume(0);
    }

    v3.text = som.getVolume() + "%";
}
som.onSoundComplete = function() {
    ligado = false;
}
//aumenta o volume
v1.onRelease = function() {
    verifica = som.getVolume();
    vol = verifica+5;
}

// diminui o volume
v2.onRelease = function() {
    verifica = som.getVolume();
    vol = verifica-5;
}

// para muscia
stop.onRelease = function() {
    som.stop();
}

// pausa a musica
pause.onRelease = function() {
    acao = "pause";
    pos = som.position/1000;
    som.stop();
}

play.onRelease = function() {
    if (acao=="pause") {
        som.start(pos);
        acao="";
    } else {
        som.start();
    }
}

ff.onRelease = function() {
    ligado = false;
    som.stop();
}

if (i<4)
   i++;
else
   i = 0;


ou então tenta este http://www.webtutoriais.com/forum/index.php?showtopic=3673

:)