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

    Here is a snippet to randomly rotate a set of flash banners.

    Ie home page may have 4 different banners that change on refresh, and other pages can have different sets.

    Copy code into snippet, adjust array in snippet to your flash filenames and call like so from template/document

    [!FlashRotator? &baseFlashUrl=`/url/to/flash/dir/` !]


      • 10487 MODX Staff
      • 1,535 Posts
      Cool snippet, stempy smiley That will come in extremely handy, thanks!
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 2762
        • 1,198 Posts
        Nice snippet! Thanks for sharing
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

          MODx IT  www.modx.it
          -----------------------------------------------------

          bubuna.com - Web & Multimedia Design
          • 18827
          • 16 Posts
          Don’t know how to write php, what goes in snippet?

          Sorry didn’t see the text file, I’ll try again.

          Not so difficult, thank you!
            • 3232
            • 380 Posts
            Is there any way to have this just get the specified directory contents and use those files? I dont want to have to set an array of names so that I can just upload the swf files and it will use them without being renamed.

            Thanks
              • 6726
              • 7,075 Posts
              This is a cool addition stempy, most definitely be useful... I’ll give this a run an report smiley
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 17717
                • 433 Posts
                Has anyone modified this little beauty to use valid code for embedding, as mentioned on the ALA site:

                http://www.alistapart.com/articles/flashsatay/

                Great little snippet btw.

                Thanks
                Lee
                  http://www.blend.uk.com | Web Design by Blend
                  • 17717
                  • 433 Posts
                  I manage to modify it so that it validates now in XHTML trans:

                  <object type="application/x-shockwave-flash" data="$file" width="$width" height="$height">
                  <param name="movie"  value="$file" />
                  </object>


                    http://www.blend.uk.com | Web Design by Blend