PDA

View Full Version : Having Problems Displaying My flash in html


CStrauss
08-03-2009, 08:12 PM
I'm not sure if my problem is cause im putting the path to my swf file incorrectly or the way i have my site structure set up so I will start there and see if anyone can see an issue im missing.

Here is how my site structure is set up

Page.php
folder html
folder flash

now when page.php loads it includes a page from the html folder in which embeded in that page is my flash which all my flash stuff is stored in the flash folder.

So now im left trying to change the path to my swf to make it display and not sure if my structure is making it difficult to find. Here is my flash embed code maybe im just changinng it in the wrong places for it to find.


<!-- Flash Code Here -->

<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=9,0,0,0',
'width', '520',
'height', '800',
'src', 'graphics',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'noscale',
'wmode', 'window',
'devicefont', 'false',
'id', 'graphics',
'bgcolor', '#ffffff',
'name', 'graphics',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'graphics',
'salign', ''
); //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,0,0" width="520" height="800" id="graphics" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="../flash/graphics.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#ffffff" /> <embed src="../flash/graphics.swf" quality="high" scale="noscale" bgcolor="#ffffff" width="520" height="800" name="graphics" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>




That's the flash code that is embeded in the page that is being stored in my html folder. Am I changing my path in the wrong places? Do i need to adjust the path in the top part of the code as well?

RelaxGuy
08-04-2009, 05:09 PM
You do not need to change the top part of the code, also look into using swfObject, its better than the default embed script that flash provides.

If your file structure is this:
page.php
FOLDER flash
FOLDER html

then you should be doing this to point to the file:
<param name="movie" value="flash/graphics.swf" />

NOT
<param name="movie" value="../flash/graphics.swf" />