Hi,
A very basic way can be like this
PHP Code:
var MySound = new Sound();
Button1.onPress = function()
{
MySound.stop();
MySound.loadSound("Song1.mp3",true);
MyText.text = "Song 1 playing";
};
Button2.onPress = function()
{
MySound.stop();
MySound.loadSound("Song2.mp3",true);
MyText.text = "Song 2 playing";
};
Button3.onPress = function()
{
MySound.stop();
MyText.text = "No song playing";
};
having the songs in the same directory as the swf
or a similar simple way
PHP Code:
NoSong = "No song playing";
Song1 = "Song1.mp3";
Song2 = "Song2.mp3";
var MySound = new Sound();
Button1.onPress = function()
{
MySound.stop();
MySound.loadSound(Song1,true);
MyText.text = Song1;
};
Button2.onPress = function()
{
MySound.stop();
MySound.loadSound(Song2,true);
MyText.text = Song2;
};
Button3.onPress = function()
{
MySound.stop();
MyText.text = NoSong;
};