I have a small problem, and I'm wondering if someone can help me ... I'm embedding a SWF player with SWFObject on my site, and load media files through the Javascript ... So far, so good.
My problem is that JavaScript code works fine in all browsers, except in IE7.
So here is my code:
Code:
function sendEvent(swf,typ,prm) { thisMovie(swf).sendEvent(typ,prm); };
function loadFile(swf,obj) { thisMovie(swf).loadFile(obj); };
function thisMovie(swf) {
if(navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[swf];
}
};
This is my Javascript functions to Load and Start play
Here is the code to embed the player:
Code:
<div id="player">MP3 Player</div>
<script type="text/javascript">var so = new SWFObject('../resources/mediaplayer.swf','mpl','220','18','8');so.addParam('allowscriptaccess','always');so.addParam('allowfullscreen','true');so.addVariable('height','18');so.addVariable('width','220');so.addVariable('file','media/blank.mp3');so.addVariable('id','mpl');so.addVariable('javascriptid','mpl');so.addVariable('showstop','true');so.addVariable('usefullscreen','false');so.addVariable('enablejs','true');so.write('player');</script>
Clearly that using SWFObject, I declare that in my head tag:
Code:
<script type="text/javascript" src="swfobject.js"></script>
To see what I mean, please visit, using IE7 and other bowser, when using IE7 you get an error in line 51, character 30: 'undifined' is null or not an object (when using IE7).
http://www.andinospro.com/loja/produ...products_id=52 (try click on headphones near to song "Angela")
To see the same player with the same functions applied in another website, also made by me, and I work perfectly please visit
http://www.ocantodosanimais.com/multimedia.asp and click in one of the artists, just below the player.
The code is equal, in fact I changed slightly, to see if worked, but the functions are equal and there works perfectly with IE7, and not here!
Somebody explain to me what could cause this error ??!!!!