var track:URLRequest=new URLRequest("music/Phantom - Kasmaran.mp3");
var denger:Sound=new Sound();
var sokatuh:SoundChannel = new SoundChannel();
denger.load(track);
tmb_play.addEventListener(MouseEvent.CLICK, puter);
function puter(event:Event):void
{
SoundMixer.stopAll();
sokatuh=denger.play();
}
tmb_stop.addEventListener (MouseEvent.CLICK, oops);
function oops(event:Event):void
{
sokatuh.stop();
}
var track1:URLRequest=new URLRequest("music/Padi - Terbakar Cemburu.mp3");
var denger1:Sound=new Sound();
var sokatuh1:SoundChannel = new SoundChannel();
denger1.load(track1);
tmb_play1.addEventListener(MouseEvent.CLICK, puter1);
function puter1(event:Event):void
{
SoundMixer.stopAll();
sokatuh1=denger1.play();
}
tmb_stop1.addEventListener (MouseEvent.CLICK, oops1);
function oops1(event:Event):void
{
sokatuh1.stop();
}
var track2:URLRequest=new URLRequest("music/Utopia - Mencintamu sampai mati.mp3");
var denger2:Sound=new Sound();
var sokatuh2:SoundChannel = new SoundChannel();
denger2.load(track2);
tmb_play2.addEventListener(MouseEvent.CLICK, puter2);
function puter2(event:Event):void
{
SoundMixer.stopAll();
sokatuh2=denger2.play();
}
tmb_stop2.addEventListener (MouseEvent.CLICK, oops2);
function oops2(event:Event):void
{
sokatuh2.stop();
}
var track3:URLRequest=new URLRequest("music/Ella-Mendung Tak Bererti Hujan.mp3");
var denger3:Sound=new Sound();
var sokatuh3:SoundChannel = new SoundChannel();
denger3.load(track3);
tmb_play3.addEventListener(MouseEvent.CLICK, puter3);
function puter3(event:Event):void
{
SoundMixer.stopAll();
sokatuh3=denger3.play();
}
tmb_stop3.addEventListener (MouseEvent.CLICK, oops3);
function oops3(event:Event):void
{
sokatuh3.stop();
}
stop();
0 Response to "Cara memutar Lagu / MP3 pada Flash AS3"
Post a Comment