We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7617
    • 6 Posts
    Hi all,

    I’d be grateful if anyone could shed some light on this.

    I am embedding flash into my site with the following code:

      <div align="center">
      <object type="application/x-shockwave-flash" width="140" height="120"
    	data="[(base_url)]assets/templates/entala/img/partners.swf">
    	<param name="movie" value="partners.swf" />
    	<param name="quality" value="high" />
    	<param name="bgcolor" value="white" />
    	<param name="loop" value="true" />
    	</object>
      </div>


    I drop partners.swf into my ’img’ directory and all is well on firefox/safari but i don’t see the flash when viewing in IE7. When viewing the source from within IE7 it has expanded [(base_url)] correctly - it just doesn’t seem to find the file.

    I’ve found that if i make a copy of partners.swf in the root directory of my site it shows up fine in IE7!

    Has anyone else seen this? or am i missing something?

    thanks,
    Dave
      • 21257 MODX Staff
      • 730 Posts
      Maybe the "movie" param needs to specify the full path as well?

      <param name="movie" value="[(base_url)]assets/templates/entala/img/partners.swf" />
      

        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 7617
        • 6 Posts
        thanks netProphET you’re right,

        i ran some more tests:

        <param name="movie" value="partners.swf" />


        seems to be ignored by firefox and safari, but for IE7 to work it must be present and must give the full path to the .swf
          • 29181
          • 480 Posts
          IE uses different syntax to all other browsers.

          object and embed are the 2 tags you need to google for, or in your flash just go to publish settings and export the HTMl as well. Simply cut and paste that then.

          Hth,
          Taff
            Adrian Lawley: www.adrianlawley.com
            • 2734
            • 165 Posts
            If you’re using flash media regularly, i suggest you use SWFObject http://blog.deconcept.com/swfobject/ for the embedding. It’s a elaborate javascript that does all the flash version checking, embedding etc. for you. The good thing about it is, that you can easily provide an alternative media in case the user has no flash (or javascript) enabled.
            And as a further plus: it validates as xhtml strict (where nested object/embed tags fail)

            Regards -- roman
              • 29181
              • 480 Posts
              on that note I have added a snippet for embedding flash into MODx, just can’t remember how far I got with it. Look in the resources should you want to make use of it.

              Taff
                Adrian Lawley: www.adrianlawley.com