Random start position movieclip

Another question beside my webshop question…

In my webshop I have 2 places where I can show special offers.
I have 10 special offers.
This mean that I want to display 5 offers per place.

I made a movieclip in Flash that contains all the special offers and they fade-out and in, so people get to see al of them.
I’m now looking for a script that will make the movieclip start playing at a different advert each time a person loads the website.

So I need an couple of Actions that make the movieclip start random at either frame number 0, 24, 48, etc.

In short: a script that makes my movieclip start at one of the 5 given frames at random.

Hope I made myself clear :slight_smile:


offersperpage=5
yourMovieClip.gotoAndPlay((Math.floor(Math.random()*(offersperpage+1)))*24);

:slight_smile:

Thanks!
I haven’t done Flash in a while and forgot that Flash can solve a lot of problems easy as long as your being nice to it :smiley:

:stuck_out_tongue:

No problem :wink:

Ok, let’s spice it up a bit:
I want the same effect (image fades in, then fades out), but I want the images to be loaded from an external source.

How can I do this?