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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help! How do I rotate photos on start page? 1

Status
Not open for further replies.

proflola

IS-IT--Management
Jul 29, 2000
62
US
Hello,

I have a client who would like to have a different photo appear each time someone enters the website. How do I do it?

Thanks!

Sandy
 
Several ways it could be done!

One could be to create a movie clip holding several pictures, and this movie clip could be directed to goto and stop on one particular picture based on a random selection done on the first frame of your movie, or even within the preloader if you have one.

Regards,

cubalibre2.gif
 
Thank you for your reply. I'm afraid that I don't understand. I'm a novice with Flash and I'm just helping this client out. It's not my specialty.

If you could be more specific, it would be very helpful.

Again thank you for your help.

Sandy
 
Like Old said, set up a movieclip with a different picture on each frame of the movieclip, let's say ten frames for this example. Give the movieclip the instance name 'photos'.

When the site opens have this code on the first frame:

frame=Math.ceil(Math.random()*10);//creates a random frame to go to
photos.gotoAndStop(frame);//sends the photos clip to that frame

This might not always be exactly what you need as there's a chance that somebody would get the same photo more than once (since it's random).

You could develop it further adding in some extra code that 'remembers' what you saw last time (using a shared local object) but I think the above idea is a good start if you're not really used to the program yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top