1 Reply Latest reply on Apr 30, 2008 9:57 AM by clbeech

    Alternating images

    HamptonCaught Level 1

      On the home page of my website (created entirely in Flash), I have a scrolling slide show which loops, so a row of images moves across the screen and keeps repeating. Rather than keep that row of images (which is a single graphic) on the screen at all times, I have created 3 other graphics (exactly the same size). So I have a total of 4 .swf files. The idea is that every so often (could be every hour, but not critical), the image changes, so image 1 is replaced by image 2 and then another hour later, image 2 is replaced by image 3 and so on.

      This just means that people visiting the site will not always be faced with the same graphic and will hopefully help to freshen the site up a bit.

      The problem is, I'm really struggling with the ActionScript to make this work. The coding is not something I'm really to grips with yet and I'd really appreciate any help.

      Thank you.
        • 1. Re: Alternating images
          clbeech Level 3
          well you could do this based on 'time' using the Date class and reading the current time and comparing it with an algorithm designed to break it up a 24 hour period by four (obviously lol) but you could also just do this at 'random' so that on each load it just pulls a different file?