-
[F8] Random Picture on homescreen
Hello,
I need some help on trying to make a random picture appear on my homepage.
Well not that random, ideally i would like to choose around 5-10 pictures and each time someone comes to my web page, or goes back to the homepage from with in my site, one of the images i chose will randomly be chosen. I've looked around on some other sites to get some help, but couldn't figure it out.
I am no flash genius, but sort of understand it.
Essentially like this http://www.neverbeat.com/flash/
But on this site, http://www.jeffhenrikson.com/new_index.html
on the first page that pops up
-
Ryan Thomson
hi and welcome to FK
the easiest way would be to make a new movieclip, give it an instance name of 'pics' on the properties bar, then add one pic per frame of the movieclip. Now go back to the main timeline and add this code:
PHP Code:
pics.gotoAndStop(random(10)+1)
where 10 is the number of images you have (change that to the actually number) The +1 is there because flash starts with 0 so this ensures 0 never comes up. Oh yeah, also put stop(); on the first frame of the pics mc.
hope that makes sense!
-
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|