We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27708 MODX Staff
    • 2,502 Posts
    It is either a path issue or a js conflict.

    Your js loader in the head of your document has the wrong path it has assets/ vs. /assets/

    When called directly the file works fine. MODx doesn’t inflict any cruft or additional path information. Try changing the document template to blank for those documents and seeing if the call in the content field works. Then duplicate the main template and remove all the other js scripts and add them back in one at a time.

    Hope this helps.
      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
      • 20413
      • 2,877 Posts
      Try inside of <head></head>
      http://wiki.modxcms.com/index.php/Beginner’s_Guide_to_MODx#The_Head_Section_modifications
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 28625
        • 24 Posts
        FINALLY GOT IT WORKING!
        It was a real mix of all your suggestions so thank you for your all the help. I started from a blank page (with no template) and then manually added the base reference to the actual flash menu folder.
        The final code that I used can be seen below:
        <HTML>
        <HEAD>
            <title>ICP Spanish Menu Test</title>
        <base href="http://www.ideal-country-property.com/assets/flash/icpmenu_es/"></base> 
            <script type="text/javascript" src="swfobject.js"></script>
            <script type="text/javascript" src="flying.js"></script>
          </HEAD>
        <BODY>
        <!-- ICP www.ideal-country-property.com -->
            <div id="noflashmessage" 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">Get the FREE Flash Player from Adobe</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("noflashmessage");
            // ]]>
            </script>
        </BODY>
        </HTML>

        Once again, thanks for all your support, patience and understanding. This is what makes the ModX community so great.
          • 27708 MODX Staff
          • 2,502 Posts
          Using base to point to your flash directory will break friendly URLs on your site and cause path issues with CSS etc. You should have your base set to [(site_url)] and then make your flash files relative from "assets/...file.js

          In addition there is a new bug in IE8 that can cause problems with the base address to be ignored for JS files. It does prove the point that the paths were wrong.

          Are you by chance using IE8 for dev?
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 28625
            • 24 Posts
            Quote from: smashingred at Jul 29, 2009, 09:41 AM

            Using base to point to your flash directory will break friendly URLs on your site and cause path issues with CSS etc. You should have your base set to [(site_url)] and then make your flash files relative from "assets/...file.js

            In addition there is a new bug in IE8 that can cause problems with the base address to be ignored for JS files. It does prove the point that the paths were wrong.

            Are you by chance using IE8 for dev?
            I’m not using IE8. Thanks again for pointing out the path errors. Having the base with [(site_url)] caused a problem with some of our Real Estate program scripts so I removed it altogether. I think that it actually finds the scripts now (as when it can’t find them it displays the alternative content I put in there) but the SWF still won’t play ball.
            Cheers.
              • 28625
              • 24 Posts
              Hi to all,
              Thanks to help from the Google group SWFObject, I have found the root of the problem. The way our ModX site is set up, we have to put in the "document’s alias" field (under the "General" tab the name of the page plus an "_en" or "_es" depending on whether the page is in English or Spanish. This then creates an alias link for the page. In this case, the alias of my test page is "test_es" so that produces a link of http://www.ideal-country-property.com/es/test. When insert the SWF code, the SWF file finds the JS files OK but is trying to find the XML files in a folder called "ES", which of course doesn’t exist so the file won’t play.
              You can follow the history of this in Google Groups: http://groups.google.com/group/swfobject/browse_thread/thread/6bc280b258e4ecff/3b661c1ae996afd1#3b661c1ae996afd1
              Our ISP, who also provide our Real Estate software setup ModX like this (as with all their Real estate clients) so I don’t really want to mess with it too much. I just need a way for the SWF to access the XML file correctly and not look for it in a virtual "ES" folder.
              Hope this is clear.
              Cheers. Chris.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Perhaps use a TV for the path? (probably a silly idea; I know nothing at all about flash)
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 28625
                  • 24 Posts
                  I finally managed to get it sorted thanks to Googlegroups and the solution to my particular propblem was to add the BASE parameter to just the SWF file and not the page (as it screwed up all my other links otherwise). The parameter to add was this:
                  so.addParam("base", "http://www.ideal-country-property.com/icpmenu_es/"); 
                  Obviously you will need to add the address of where your own SWF is hosted.
                  To read the full history and the solution you can visit Googlegroups SWFObject: http://groups.google.es/group/swfobject/browse_thread/thread/6bc280b258e4ecff?hl=es#
                  Hope this helps.
                  Chris.