Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá, sou programador em ASP, e quebro o galho as veses quando precisa em Flash,
eu peguei algumas dicas para montar um player em FLASH, mais no código que eu peguei ele não passa para proxima música automaticamente.
Por favor olhem o código e me ajudem a fazer essas músicas tocarem automaticamente, obrigado a todos, segue o código abaixo:
stop();
//Criando objeto som_sound
var som_sound:Sound = new Sound();
var numero:Number = 1;som_sound.loadSound(musica, true);
_root.onEnterFrame = function() {artista_txt.text = som_sound.id3.artist;
musica_txt.text = som_sound.id3.songname;
album_txt.text = som_sound.id3.album;
som_sound.setVolume(vol);
};stop_btn.onRelease = function() {
som_sound.stop();
};pause_btn.onRelease = function() {
acao = "pause";
pos = som_sound.position/1000;
som_sound.stop();
};play_btn.onRelease = function() {
if (acao == "pause") {
som_sound.start(pos, 1);
acao = "";som_sound.start();
}
};
}
previous_btn.onRelease = function() {
if (_root.numero<>1) {
_root.numero -= 1;
}
musica = "player/musica"+numero+".mp3";
music(musica);
};
next_btn.onRelease = function() {
if (_root.numero<3) {
_root.numero+=1;_root.numero-=2;
}
musica = "player/musica"+numero+".mp3";
music(musica);
};
vol_less_btn.onRelease = function() {
if (vol>=10) {
vol -= 10;
trace(vol);
}
};
vol_more_btn.onRelease = function() {
if (vol<=90) {
vol += 10;
trace(vol);
}
};musica = "player/musica"+numero+".mp3";
music(musica);
//link_btn.onRelease = function() {
//getURL(’http://www.felipegomes.com.br’, ‘_blank’);
//};
//link2_btn.onRelease = function() {
//getURL(’http://www.mxstudio.com.br’, ‘_blank’);
//};Carregando comentários...