Using SWFObject.js 1.5 to embed an FLV in my html. After weeks experimentation, I'm still getting negative reports from some stating that when they first click on a movie link the movie plays fine but when they select a second video on the site they just get a white screen with audio only (within the FLV player in the web page). Problem exists with both Explorer 6 and 7. On my Macs everything appears to work fine. On my PC one user has the problem and the other does not. I can't tell what's different between the two users. I'm including the entire TD tag contents with the script here. The <h1> tag refers to a background image in the header style and doesn't have an effect of whether the script works or not:
<td align="center" width="550" height="440" valign="top"><h1><br> <div id="player1" class="blackfont1"><a href="http://www.macromedia.com/go/getflashplayer">CLICK HERE TO GET THE FLASH PLAYER</a><br> You need to install the Flash Player<br> or UPGRADE to the latest version to see this video.<br> FIRST UNINSTALL then install!</div> <script type="text/javascript"> var s1 = new SWFObject("http://www.idriveinmovie.com/flvplayer.swf","single","480","336","8"); s1.addParam("allowfullscreen","true"); s1.addVariable("file","http://www.idriveinmovie.com/Movin.flv"); s1.addVariable("autostart","true"); s1.useExpressInstall('http://www.idriveinmovie.com/expressinstall.swf'); s1.write("player1"); </script> <br> </h1></td>
The url of the above example is: http://www.idriveinmovie.com/sonicblonde.htm The problem is the same for all FLV media pages on this site: visit any one - it works, then visit any second one - it won't work.
Does anyone have any idea what could be wrong? Thanks.
I added the s1.addParam("allowScriptAccess","sameDomain"); and also Aran's date/time thing: ?t=" +new Date().getTime() I think that might've helped. I'll report back after my visit to the library (where the site hasn't been working).
I got rid of the expressinstall and lowered the Flash requirement. Now it seems I have a working script for most. In case anyone at all is interested here is my present code:
<td align="center" width="550" height="440" valign="top"><h1><br> <div id="player1" class="blackfont1"><a href="http://www.macromedia.com/go/getflashplayer">CLICK HERE TO GET THE FLASH PLAYER</a><br> You need to install the Flash Player<br> or UPGRADE to the latest version to see this video.<br> FIRST UNINSTALL then install!</div> <script type="text/javascript"> var s1 = new SWFObject("http://www.idriveinmovie.com/flvplayer.swf?t=" +new Date().getTime(),"single","480","336","6","000000"); s1.addParam("allowfullscreen","true"); s1.addParam("allowScriptAccess","sameDomain"); s1.addVariable("file","http://www.idriveinmovie.com/Movin.flv"); s1.addVariable("autostart","true"); s1.write("player1"); </script>
<br> </h1></td>
One of the difficult thing about this whole swfobject thing for me (exaserbated by the fact that I'm unfamiliar with most coding except basic html) is that I could not find any examples of people using the script to refer to both an flv file AND a flv player file, while most examples show the movie file as the var s1 = new SWFObject and no reference to a player. Anyway, I think I've done all I can with the script. Maybe someone will get something out of my post.
regarding your comment "I could not find any examples of people using the script to refer to both an flv file AND a flv player file, while most examples show the movie file as the var s1 = new SWFObject and no reference to a player", the JW player has SWFObject examples in the download ZIP, and this forum has plenty of posts about people trying to use the JW player (and other players, too).
the trickiest part is often the scoping of the 'file' variable (in your case, s1.addVariable("file", "http://www.idriveinmovie.com/Movin.flv");).
the FLV should be listed relative to where the SWF is located, not the HTML page that loads the SWF. using absolute URLs (as you did) helps eliminate the confusion.