We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25004
    • 10 Posts
    I try to embed a .swf file into a MODx Document.

    I tried SWFObject, swfObject expanded and swfFix.

    swfFix seems to work but I only see a black or white space where the movie supposed to be. Clicking the right mouse on the field it tells me that the movie is not loaded. But why?

    My code looks like the documentation

    The HTML Code:

    Head:
    <head>
     <script type="text/javascript" src="assets/snippets/swfFix/swffix.js"></script><script type="text/javascript">SWFFix.registerObject("hoerprobe", "8.0.0", "assets/snippets/swfFix/expressInstall.swf");
    </script>
    

    </head>

    Content where the movie is placed:
    <div id="mainContentText"><object id="hoerprobe" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="510" height="150">
    	<param name="movie" value="/assets/flash/hoerprobe_diversity.swf" />
    	<!--[if !IE]>-->
    	<object type="application/x-shockwave-flash" data="/assets/flash/hoerprobe_diversity.swf" width="510" height="150">
    	<!--<![endif]-->
    		<p>Alternative content</p>
    	<!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    
    </object></div>
    


    I have a Snippet (swfFix downloaded from Extras).
    A Snippet call in the head.
    And a call with the ID, that I used in the Snippet call, where the movie supposed to be.

    A lot of posts in the German and English forum say that it is easy to embed flash into MODx but HOW?

    In the English forum redwolf writes:
    "I used the flash embed button in modx"
    (Link)
    Where can I find this button?

    I’m open for other solutions. I’m not able to write code - that’s why I used existing snippets.

    Did somebody work with SWFObject 2.0 already?

    I’m happy for every help.

    Thank you,
    Regina
      • 20413
      • 2,877 Posts
      Try add this inside <head></head>
      <base href="[(site_url)]"></base>
        @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
        • 25004
        • 10 Posts
        Sorry, I didn’t post the whole content in the head.
        <base href="[(site_url)]"></base> is in there

         <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <base href="[(site_url)]"></base>
        <title> [*pagetitle*] | [(site_name)]</title>
        <link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/larskeitel/stylesheets/larskeitel.css" />
        <link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/larskeitel/stylesheets/keitel_menu.css" />
         [*FlashCall*]
        </head>


        The [*FlashCall*] in html looks like this:
         <script type="text/javascript" src="assets/snippets/swfFix/swffix.js"></script>
        <script type="text/javascript">SWFFix.registerObject("hoerprobe", "8.0.0", "assets/snippets/swfFix/expressInstall.swf");
        </script>
        

          • 20413
          • 2,877 Posts
          Try skip all js and everything... Run this to see if it works:
          <object type="application/x-shockwave-flash" data="/assets/flash/hoerprobe_diversity.swf" width="510" height="150">
          <param name="movie" value="/assets/flash/hoerprobe_diversity.swf" />
          </object>
            @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
            • 25004
            • 10 Posts
            No JS in the headers.
            Still doesn’t work. It only shows a black box where the movie supposed to be.

            Code aus generiertem HTML
            <div id="mainContentText">
            <object type="application/x-shockwave-flash" data="/assets/flash/hoerprobe_diversity.swf" width="510" height="150">
            <param name="movie" value="/assets/flash/hoerprobe_diversity.swf" />
            </object>
            <a href="/index.php?id=13&qe_open=true#" onclick="javascript: window.open('http://www.lars-keitel.de/manager/index.php?a=112&id=2&doc=15&var=dittoartikelText', 'QuickEditor', 'width=525, height=300, toolbar=0, menubar=0, status=0, alwaysRaised=1, dependent=1');" title="Edit : Hoehrproben (Zwischenspiel) : dittoartikelText" class="QE_Link">« Edit : Hoehrproben (Zwischenspiel) : dittoartikelText</a></div>
            
            
              • 20413
              • 2,877 Posts
              Did this work outside modx in a static webpage? Its either brooken paths and/or interference of other code!?
                @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
                • 25004
                • 10 Posts
                It worked in a static webpage. I was wondering if this has to do with dito?

                This is the code of my side:
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml">
                <html>
                <head>
                <meta http-equiv="content-type" content="text/html; charset=utf-8">
                <base href="[(site_url)]"></base>
                <title> [*pagetitle*] | [(site_name)]</title>
                <link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/larskeitel/stylesheets/larskeitel.css" />
                <link rel="stylesheet" type="text/css" href="[(base_url)]assets/templates/larskeitel/stylesheets/keitel_menu.css" />
                 [*FlashCall*]
                
                </head>
                
                <body class="larskeitel">
                
                <div id="container">
                  <div id="header">
                  <div id="headerLeft"><img src="assets/templates//larskeitel/images/lg_lk_header.gif" alt="Logo Lars Keitel" /></div>
                  <div id="headerRight"><img src="[*headerImage*]" alt="[*headerImageAlt*]" /></div>
                  <div id="headerCenter">
                  <div id="headerHeadline">[*bereichsHeadline*]</div>
                  <div id="headerSubheadline">[*bereichsSubheadline*]</div>
                  </div>
                  <!-- end #header --></div>
                <br class="clearfloat" />
                
                <div id="menu">
                [!Wayfinder? &startId=`1` &level=`4` &hideSubMenus=`true`!]
                </div>
                
                <div id="mainContent">
                [!Ditto? &parents=`[*id*]` &tpl=`dittoArtikel` &orderBy=`menuindex ASC`!]
                [*content*]
                </div>
                
                <br class="clearfloat" />
                <div id="footer">{{keitelfooter}}
                <!-- end #footer --></div>
                <!-- end #container --></div>
                </body>
                </html>


                This is the chunk, where I placed the call in <div id="mainContentText">:
                <div id="mainContentHeadline">[+#dittoartikelHeadline+]</div>
                <div id="mainContentSubheadline">[+#dittoartikelSubheadline+]</div>
                <div id="mainContentImage"><img src="[+dittoartikelBild+]" alt="[+dittoartikelBildAlt+]" width="[+dittoartikelBild-width+]px" height="[+dittoartikelBild-height+]px" border="[+dittoartikelBild-border+]px" /></div>
                <div id="mainContentText">[+#dittoartikelText+]</div>
                <div id="mainContentEnd"></div>


                Here’s a link to the side:
                http://www.lars-keitel.de/index.php?id=13
                  • 20413
                  • 2,877 Posts
                  The output above gets like this:
                  <div id="mainContentImage"><img src="" alt="" width="0px" height="0px" border="0px" /></div>
                  


                  Above in headerLeft you have one image src path with doubble backslashes ...templates//...
                  And this &#133;"content-type" content="text/html; charset=utf-8"> should be closed /> - THIS IS WHAT I THINK CAUSE THE ERROR!

                  http://validator.w3.org/check?uri=http://www.lars-keitel.de/index.php%3Fid%3D13&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator/1.606

                    @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
                    • 25004
                    • 10 Posts
                    If I only knew where the double backslashes came from.
                    I embedded this image via an image-TV with "@INHERIT"
                    and loaded it via the media browser (manager/media/browser)

                    The whole path is weird:
                    <img src="assets/templates//larskeitel/images/lg_lk_header.gif" alt="Logo Lars Keitel" />
                    it should be:
                    <img src="assets/images/lg_lk_header.gif" alt="Logo Lars Keitel" />

                    ???

                    EDIT: I was wrong, found it!!!!
                      • 20413
                      • 2,877 Posts
                      Well I can’t reach http://www.lars-keitel.de/assets/flash/hoerprobe_diversity.swf
                      So maybe its the file itself...
                        @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