Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple pictures

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
I have a picture on my site.
I want that picture to change randomly whenever smb accesess my site.
How can i do this?
 
Put all of the pictures you want into a single movieclip - one picture per frame. Let's assume you have 20 pictures and therefore a twenty frame long movieclip.

Put a stop() action in frame one of the clip.

Select the clip on the stage by clicking on it and then add this to the actions window.

onClipEvent(load){
randomPic=Math.ceil(Math.random()*20);
gotoAndStop(randomPic);
} Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top