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

    this has been bugging me and I don’t quite get it.

    Here’s my call to the snippet:

    [[SWFObject? &mode=`static` &objWidth=`760` &objHeight=`323` &flashVersion=`7.0.0` &objId=`frontFlash` &swfFile=`assets/flash/Flash.swf` &flashParam=`bgcolor:"#1A0600"` &altContent=`Welcome!<div id='altContent'> </div>` ]]


    Here’s what comes out in the browser:

    <object id="frontFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="760" height="323">
      <param name="movie" value="assets/flash/Flash.swf" />
      <param name="bgcolor" value="#1A0600" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="assets/flash/Flash.swf" width="760" height="323">
      <param name="bgcolor" value="#1A0600" />
       <!--<![endif]-->
    Welcome!<div i
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>


    huh

      • 15001
      • 697 Posts
      Hello,

      I didn’t used the SWFObject snippet, but this static code works with many browsers (not valid XHTML however) :
      <object width="448" height="336"
      		classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
      		codebase="http://activex.microsoft.com/activex/controls/ mplayer/en/nsmp2inf.cab#Version=*"
      		standby="Chargement…"
      		type="application/x-oleobject">
      
      		<param name="filename" value="img/machines/fabrication_empanadas.wmv">
      		<param name="autostart" value="0">
      		<param name="showcontrols" value="1">
      		<embed name="video1" width="448" height="336"
      		type="video/x-ms-wmv"
      		pluginspage = "http://www.microsoft.com/windows/mediaplayer/"
      		src="img/machines/fabrication_empanadas.wmv"
      		autostart="0" showcontrols="1">
      		</embed></object>
      

      Maybe you can change the SWFObject snippet code using above example.

      This seems me strange in your snippet output : !IE]>

        • 16287
        • 2 Posts
        Thanks for your post.

        I really want to stay with SWFObject, because of alternate content and browser compatibility all that. I think even Adobe is now using it to publish Flash files from CS4.

        Seems like somehow, the SWFObject snippet is trimming the variable...
          • 10449
          • 956 Posts
          Unfortunately, you can’t use certain characters in snippet values: ? = &

          Hence,

          &altContent=`Welcome!<div id='altContent'> </div>`


          is cut off after "div id"...

          I would rewrite the snippet so it automatically adds the DIV, and all you insert is just plain text (the stuff inside the div). Or you can create a chunk and insert that in the snippet parameter. Or use simple string-replacement, e.g.
          |EQ| -> =
          |AMP| -> &
          |QM| -> ?

          $foo .= str_replace("|EQ|", "=", $foo);