2 Replies Latest reply on Apr 13, 2008 12:29 PM by northviper

    display random images using xml

    northviper
      I need to make a simple flash video. In the video, I need to have two seperate images move across the screen or else just fade in/out. I would ideally like to have each of the two image change RANDOMLY each time it either scrolls across the screen or each time they fade in and out. I have previously used xml to make one picture change randomly so I could easily update the pictures without having to have access to flash software. Ideally I like to have both of the images moving across the screen load from the same xml file. Is this possible? Is there an easier way to do this?

      My goal is to complete a website with a flash banner on it and hand it off to a group that doesn't know anything about flash. I would like them to be able to simply edit a line or two of code to update the banner with new pictures instead of having to buy flash to edit the .fla file

        • 1. Re: display random images using xml
          FlashTastic Level 1
          I think you definitely have the correct approach. Just read each of your XML elements that contain the image URL into an array, and then every time the banner runs grab two random images from that array.

          Your XML file could look like:
          <banner>
          <settings>
          <scrolling>true</scrolling>
          <fading>false</fading>
          </settings>
          <images>
          <image>www.example.com/image1.jpg</image>
          <image>www.example.com/image2.jpg</image>
          <image>www.example.com/image3.jpg</image>
          <image> ... etc ... </image>
          </images>
          </banner>

          Cheers,
          FlashTastic
          • 2. Re: display random images using xml
            northviper Level 1
            I followed this tutorial: slideshow tutorial

            I successfully got it to load random images for a prototype banner that I created: flash intro

            That tutorial worked fine for that banner I made because all of the pictures stayed stationary. In my new flash banner though, I want my random image to move across the screen. This is how I want it to look and work: Flash Intro

            Right now the picture that keeps cycling is loaded in flash. My goal is to have that picture (and many more) load from an xml document. I want a new image to load every time the loop starts.

            Is it possible to make generic "movie clip" move across the stage and have its opacity & size change?