Forum Moderators: open

Message Too Old, No Replies

Randomly picking a row from a database with interesting refresh option

Randomly pick a row from a database with an interesting refresh option

         

Flurpal

11:55 am on Jun 4, 2009 (gmt 0)

10+ Year Member



Hey all guys and galls out there,

I am currently developing a flash game website. I was viewing other flash game websites, when I came across <snip>. It seems like it is a very cool and very respected site. They have a lot of unique features. There was one feature that I think that you should check out. Go to <snip>. Do you see how in the upper left corner of the main body, there is a tiny box called Quick Pick? I believe that it picks a random game from their database of around 15,000 games, then displays it. But the cool part is that then, you can press the refresh icon (next to the letters Quick Pick), and it will, almost "flip" through about 10 more games really quickly, and then it will display another random game. I'm thinking that there is some JavaScript involved. I wasn't sure whether to post this under JavaScript or PHP, because it involves both languages. So, how can I do this? A also have a database (MySQL) with each row showing the information to a game. There is a unique number id for each game. Other fields include name, description, instructions, avatar source, game source, game play number, etc. Thank you very much!

[edited by: eelixduppy at 2:43 pm (utc) on June 5, 2009]
[edit reason] removed specifics [/edit]

eelixduppy

2:45 pm on Jun 5, 2009 (gmt 0)



Yes it does use JavaScript. Not exactly sure how but you should be able to look at the source and figure it out. View the source of the homepage and find where the quick pick section is, then go from there. It uses a function called updateQuickPick(). Find where the function is defined and it should give you a place to start.