-
External Sound Play Button
This is code loads the music internally:
var url:String = "C:/Users/George/Desktop/erevemusic.mp3";
var urlRequest:URLRequest = new URLRequest(url);
var sound:Sound = new Sound();
sound.load(urlRequest);
sound.play();
And this makes it so when you click the button it stops the music:
ToggleButton.addEventListener(MouseEvent.CLICK, beQuiet);
function beQuiet(e:MouseEvent):void
{
SoundMixer.stopAll();
}
What code do I need to click on ToggleButton button for the music to play again?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|