Return to Snippet

Revision: 25971
at January 27, 2011 03:34 by adrianparr


Updated Code
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;

var snd:Sound = new Sound();
var channel:SoundChannel = new SoundChannel();
snd.load(new URLRequest("song.mp3"));
snd.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
function onComplete(evt:Event):void {
	channel = snd.play();
}

Revision: 25970
at January 27, 2011 03:30 by adrianparr


Updated Code
import flash.media.Sound;
import flash.media.SoundChannel;

var snd:Sound = new Sound();
var channel:SoundChannel = new SoundChannel();
snd.load(new URLRequest("song.mp3"));
snd.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
function onComplete(evt:Event):void {
	channel = snd.play();
}

Revision: 25969
at April 15, 2010 05:28 by adrianparr


Initial Code
var snd:Sound = new Sound();
var channel:SoundChannel = new SoundChannel();
snd.load(new URLRequest("song.mp3"));
snd.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
function onComplete(evt:Event):void {
	channel = snd.play();
}

Initial URL

                                

Initial Description

                                

Initial Title
AS3 Loading and Playing an External MP3 File

Initial Tags
load

Initial Language
ActionScript 3