how do i use php to import a flash file?

designer

New member
i have a flash scroller which sorces various files, xml and images, the problem is i need it on every page and when i have a different directory for my page it doesnt work. ie: it will work on index.html but not on about/index.html.

i have tries changing the code so it picks up the file from a directory upwards (../) but it doesnt seem to work.

is there a way i can put the code in a php file and import it ie: <?php require("flash/flash.php"); ?> (this didnt actually work so is there another way to do it?


my flash code is <script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','name','preview','width','1000','height','220','align','middle','id','preview','src','../preview','quality','high','bgcolor','#F2F2F2','allowscriptaccess','sameDomain','allowfullscreen','false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../preview' ); //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=8,0,0,0" name="../preview" width="1000" height="220" align="middle" id="../preview">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="../preview.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#F2F2F2" /><embed src="../preview.swf" quality="high" bgcolor="#F2F2F2" width="1000" height="220" name="../preview" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
 
Back
Top