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

    I’ve successfully got SwfObject working with the path to the Flash file hard-coded into the template. Now I need to let the client change the flash billboard themselves.

    I’ve created a Template Variable and tried Input Types of: Image and File. But when I click "Insert" the file browser for either of these types will not see the flash file in the images folder of the files folder.

    Have also tried using the rich text editor to insert a flash file but it can’t see the flash file (in the flash or media folders) and the rich text editor adds a bunch of object embed code which I don’t need.

    Is there a Flash TV that will see flash files and insert a clean file path into my SwfObject code? Or is there a better way of doing it?

    Cheers

    Ben
      • 3647
      • 177 Posts
      who is creating the flash?

      it would make a difference if you are doing it and uploading to a directory, or they are doing it themselves

      Also, is this a flash that is all in one, or that has an external .xml file for content?
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        You should be able to get a file browser using one of the template variables...
        http://wiki.modxcms.com/index.php/Template_Variable_Holds_an_Image

        You may need to configure the file types listed in
        Tools --> Configuration --> File Manager

        and edit the Uploadable File Types. I think the case DOES matter (i.e. jpg != JPG).

          • 5532
          • 251 Posts
          Thanks for the reply guys.

          Actually, just got it working as you were replying - sorry about that:
          - I added ,swf to >Tools >Configuration >Uploadable File Types
          - Changed the "Input Type" of the Template Variable to "File"
          - Uploaded the flash file to "assets/files/"
          - Changed the SwfObject file paths in the template to:

          <param name="movie" value="[*yourtvname*]" />
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="[*yourtvname*]" width="573" height="249">
          


          And now the File Browser can see the flash file and the page previews - the SwfObject code looks unchanged to me.

          Also allowed the file browser to upload swf files (under configuration). Because the file names will always be the same a (billboard rotator) they will just replace the old file - BTW it would be nice if the file browser would let you replace a file, rather than having to rename it.

          Is this a good way of having the client load the file or were you going to suggest a better way?