Hi all,
I am not sure if this is the place to post on the subject of PHP/JavaScript but after many hours of reading and trying to get my code to work I now need to source some help.
I have a data table which holds the names of Flsh movie files, all the files are located on my server.
I run a SQL query based on user input to lookup the name of a Flash file movie, this part works fine.
I then have the filename in a variable which I want to pass to the JavaScript code that opens and runs the movie, this is where I am having issues.
To pass the PHP variable to the JavaScript I am using the following code:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1100','height','800','src','<?php print $movie;?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','<?php print $movie;?>' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1100" height="800">
<param name="movie" value="<?php print $movie;?>" />
<param name="quality" value="high" />
<embed src="<?php print $movie;?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1100" height="800"></embed>
</object>
</noscript>
If I echo the PHP variable "$movie" the conect is exactly what I would expect, the path and the correct filename.
If I run the script in FireFox and use the debugger and examine the script out put I can see the following:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1100','height','800','src','RoomLocator/2703.swf','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','RoomLocator/2703.swf' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1100" height="800">
<param name="movie" value="RoomLocator/2703.swf" />
<param name="quality" value="high" />
<embed src="RoomLocator/2703.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1100" height="800"></embed>
</object>
</noscript>
In this case the path and the flash filename are "RoomLocator/2703.swf" Which is correct.
Can anyone see why the Flash movie will not run.
I can only appologise in advance for posting a PHP/JavaScript question here.