php and JavaScript loads in the same file will turn you gray or bald very quickly. Try changing the info in the following insertion into the tpl_header.php.
It should be noted that I created this with the intent of only having the Flash show on the Main Page and a JPEG presented on any other page in order to save load time. You will need to remove the if statement if you want the flash to appear on all pages. No JavaScript required.
PHP Code:
<!-- bof flash insertion -->
<?php
if ($current_page!='index' || (int)$cPath>0 ) {
echo '<img src="images/your_file.jpg" width="750" height="160" alt="Your_File Alt Text" border="0" />';
} else {
echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" height="160" width="750" id="Flash1">
<param name="Movie" value="images/Your_File.swf" />
<param name="Quality" value="AutoLow" />
<param name="Loop" value="1" />
<param name="Play" value="1" />
<param name="WMode" value="Window" />
<param name="SAlign" value="l" />
<embed src="images/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="144"></embed></object>';
}
?>
<!-- eof flash insertion -->
You will need to move the files to the images directory of your template.
Bookmarks