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

    I tried to embedd a simple Flash File with SWFObject using the Snippets for "swfObject Expanded" from the extras Website.
    http://modxcms.com/extras.html?view=package/view&package=443

    Unforturnately it does not work.

    I placed the
    swfobject.js file into assets/snippets/swfObject

    I called it in on my site:
    <script type="text/javascript" src="/assets/snippets/swfObject/swfobject.js"></script>

    I copied and paste the contents of swfObject into my snippet.
    I called my snippet:
    [[swfObject? &swfid=`hoerprobediversity` &swfFile=`http://www.lars-keitel.de/assets/flash/hoerprobe_diversity.swf` &swfWidth=`510` &swfHeight=`150`]]

    The site only shows a space where the swf supposed to be. A right click tells me that the movie isn’t loaded.

    What could be the problem?

    Does anyone use SWFObject 2.0 and has a Snippet for that?

    Thanks,
    Regina
      • 18374
      • 69 Posts
      I just had the same problem!

      Open up swfobject.class.php and change lines 51 and 93 to case ’1’: and case ’2’: respectively. This will make the actual check match the documentation.

      After I made this change I was able to get it working great!

      Conversely, you could change your snippet parameter to &mode=`static` or &mode=`dynamic` if you’re not comfortable editing the PHP.