We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6007
    • 9 Posts
    I’m testing Modx on a site, to see how it works and so on. I wanted to embed some flash games on a few pages and was wondering if anyone had any suggestions on how to do it. I was thinking of using SWFObject as that seems to be the best option.

    I found the "youtube" snipplet here http://www.modxcms.com/Youtube-1308.html and was wondering if that would work for me as it seems to use SWFObject already. Would that be the best bet or can anyone offer a better solution?
      • 4310
      • 2,310 Posts
      I’m using the SWFObject method without any problems.
      It’s easier and quicker than the old embed method.
        • 6007
        • 9 Posts
        Quote from: bunk58 at Apr 01, 2008, 05:59 AM

        I’m using the SWFObject method without any problems.
        It’s easier and quicker than the old embed method.

        yea I didn’t realize there was a actual snipplet already made  (http://modxcms.com/SWFObject-1815.html)

        I just found the snipplet and it seems to work fine and I think it will do exactly want.. One question, maybe someone will know.. when using the embed feature via the page editor, is there anyway to set it to automatically figure out the size for the flash file? When adding one for testing I noticed I had to figure out what the size of the flash, to get it to show up properly. Otherwise it wouldn’t show the whole thing.
          • 6007
          • 9 Posts
          Quote from: ganeshXL at Apr 01, 2008, 06:37 AM

          It’s quite easy to get the SWF dimensions via PHP:

          
          $swf = 'flash-xml-modx.swf';
          $swfSize = getimagesize($swf);
          $swfWidth = $swfSize[0];
          $swfHeight = $swfSize[1];
          
          echo "$swf dimensions: width = $swfWidth | height = $swfHeight";
          
          


          Maybe add that to the code somewhere and try it out...


          ok cool.. will try that out.. thanks for the help everyone