built a very simple Flash MP3 player.
If I specify the sound file from within the SWF, everything works fine. For example, in frame 1:
<<
MyMusic = new Sound();
MyMusic.loadSound("BTTV.mp3",true);
>>
But this is fairly useless to me, since I have hundreds of MP3 files, and I want to use the same flash player to play any/all of them.
I want to be able to control the file that loads in the SWF via JavaScript.
How Can I Do It!!!???!!!??
I have tried:
1.
<<
window.document.MP3_Player.MyMusic = new Sound();
window.document.MP3_Player.myMusic.loadSound("BTTV.mp3",true);
>>
2.
(In an body.onLoad function in the HTML/JavaScript):
<<
window.docuemnt.MP3_Player.SetVariable( "MY_FILE", "BTTV.mp3" );
window.docuemnt.MP3_Player.gotoAndStop(2);
>>
(In the 2nd frame of the SWF):
<<
MyMusic = new Sound();
MyMusic.loadSound(MY_FILE, true);
>>
Nothing has worked!
I am developing on a Mac. Netscape get's JavaScript errors saying that even SetVariable is not a function. I have checked and the plug in is not locked! PLEASE HELP!!!
If I specify the sound file from within the SWF, everything works fine. For example, in frame 1:
<<
MyMusic = new Sound();
MyMusic.loadSound("BTTV.mp3",true);
>>
But this is fairly useless to me, since I have hundreds of MP3 files, and I want to use the same flash player to play any/all of them.
I want to be able to control the file that loads in the SWF via JavaScript.
How Can I Do It!!!???!!!??
I have tried:
1.
<<
window.document.MP3_Player.MyMusic = new Sound();
window.document.MP3_Player.myMusic.loadSound("BTTV.mp3",true);
>>
2.
(In an body.onLoad function in the HTML/JavaScript):
<<
window.docuemnt.MP3_Player.SetVariable( "MY_FILE", "BTTV.mp3" );
window.docuemnt.MP3_Player.gotoAndStop(2);
>>
(In the 2nd frame of the SWF):
<<
MyMusic = new Sound();
MyMusic.loadSound(MY_FILE, true);
>>
Nothing has worked!
I am developing on a Mac. Netscape get's JavaScript errors saying that even SetVariable is not a function. I have checked and the plug in is not locked! PLEASE HELP!!!