My problem is that I am trying to call an function within an SWF. Now, I already know how to setup my SWF and that isn't the problem. The problem is that when I try to call the function using Javascript, I am told that the function doesn't exist. I'll show you the code right here.
Code:
function AudioPlayerEmbed( e )
{
if ( e.success )
{
e.ref.LoadAudio( 'http://therevolve.com/upload/userfiles/Music/Alec_Smith1.mp3' );
}
}
swfobject.embedSWF("player/MP3Player.swf", "flash", "300", "90", "9.0.0", "player/expressInstall.swf", null, null, null, AudioPlayerEmbed );
HOWEVER, when I put some alert before the call, it happens to work. What is going on?
Code:
function AudioPlayerEmbed( e )
{
alert("A");
if ( e.success )
{
e.ref.LoadAudio( 'http://therevolve.com/upload/userfiles/Music/Alec_Smith1.mp3' );
}
}
swfobject.embedSWF("player/MP3Player.swf", "flash", "300", "90", "9.0.0", "player/expressInstall.swf", null, null, null, AudioPlayerEmbed );
Here is a live example.
Any help would be appreciated. If you need more information, I can provide it.