Random graphic?

hi ppl,

I know theres a relativly simple way of inserting a random graphic into flash mx, ive saw it done, but cant remember how, any ideas
please?

Ive looked on the web but not what im after

thx

Easiest way:

Multiple frames, each with one image in it.

First frame will be empty and will have these actions on it…

gotoAndStop(random(_totalframes)+1);

It will choose a random frame and gotoAndStop there.

If you have too many images it will severly bump your load time though.

thats gr8 thanx,

but…

I would like animation to take place while having a random graphic onscreen, how can i do this?

cheers
=)

Put all of that inside a movie clip symbol.

Drag an instace of that movie clip symbol from the library and onto the _root timeline (or wherever your animation takes place).

That way the image will be chosen in that movie clip, and that movie clip will be shown through your animation after the image is selected.

Now just to cover something. WHen you drag it to the stage from the library, drag it to its own layer and make sure the frames span across the whole part of the movie you want the image to be shown at. YOu can right click on the proper frame int he layer and choose “Insert Frame” to make sure it spans across the timeline where you want.

thanx again,

but i still cant get it to work, ive got a layer with 1 blank frame with the code stated b4, then ive got sum keyframes on the same layer with the pictures on.

iv tried converting the frames to a movie symbol but still no good? am i doing this correct?

this symbol i have then dragged onto the stage, then it should work?

when i play the movie it only ever displays 1 pic and there is no amination just stuck on one frame

Cheers again!
:trout:

take a look at the example

thanx every1 got it sorted! :slight_smile:

glad you got it to work :wink: