views:

976

answers:

1

I'm having a real nightmare trying to do what should be a very simple task. If I embed a static or independent SWF file, it shows up fine on our ModX powered website. However, when it comes to a dynamic SWF (one that references an XML file and image files etc) I just can't get the thing to show up at all. According to the Flash Menu program that I have I paste the following code in the HEAD part of the page:

<script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript" src="flying.js"></script>

(with those files placed in the root directory of course) and then in the BODY section I should paste this:

<!-- Flash Menu Labs – www.flashmenulabs.com -->
<div id="FlashMenuLabs" style="position:absolute; top:0px; padding-left:0px; z-index:0;">
    You need to upgrade your Flash Player or to allow javascript to enable Website menu. </br>
    <a href="http://www.adobe.com/go/getflashplayer"&gt;Get Flash Player</a>            
</div>
< script type="text/javascript">
// <![CDATA[
    var so = new SWFObject("menu.swf", "menu", "185", "440", "8", "#000000");
    so.addVariable("page _ code", "a _ b _ c");

    so.addParam("wmode", "transparent");
    so.addParam("scale", "noscale");
    so.addParam("salign", "TL");
    so.write("FlashMenuLabs");
// ]]>
</script>

That doesn't work. The files are in a folder called icpmenu_es (a subfolder of flash), which is where the menu.swf is referenced. The dependent files (including the XML, PNGs and SWFs) are in a subfolder called menu_data. There are two XML files: open_menu_data.xml and menu_data.xml and I can't edit the latter.
Then I've tried the <EMBED> route here:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="185" height="440">  <param name="base" value="http://www.ideal-country-property.com/"&gt;  <param name="movie" value="/flash/icpmenu_es/menu.swf">  <param name="id" value="ICPmenuES">  <param name="menu" value="false">  <param name="slalign" value="tl">  <param name="quality" value="high">  <param name="wmode" value="transparent">  <param name="scale" value="noscale">  <embed src="/flash/icpmenu_es/menu.swf" menu="false" quality="high" wmode="transparent" scale="noscale" width=185 height=440 type="application/x-shockwave-flash" id="ICPmenuES" salign="tl" base="http://www.ideal-country-property.com/"  pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt;  </embed>  </object>`

That doesn't work either. If anyone can help point me in the right direction then I would be most grateful. On other Forums I've seen people referring to editing the reference to the XML in the SWF, but I can't see where to do that. Being a newbie programmer doesn't help much either!

A: 

Do you have access to the Apache logs?

I experienced problems in the past whereby if modx isn't happy with the file/folder permissions (if they are writable by group for example) then it won't show certain content and only the Apache logs give insight into this.

Fishcake
I'm sorry, I don't. Our ISP is quite tight-fisted when it comes to letting me have access to Apache.
Stoffer
Actually, since I posted this I have sourced the problem but I can't see a solution. The problem is with the paths to the SWF file and the JS files. To get it to work, I have to put a `<base>href="http://www.ideal-country-property.com/icpmenu_es/"</base>` in the HEAD section before it will work. The problem is that our site has other scripts running in other locations so I can't set the BASE to that specific directory where the "menu.swf" is located. What I can't understand is why inserting a relative path in the CDATA not work. Is there any special code that needs to be inserted?
Stoffer