Jump to content


Randomnization


  • You cannot reply to this topic
2 replies to this topic

#1 the shy guy

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 24 September 2005 - 10:42 PM

Ok, I am making a flash thing and it includes an eightball game. Now how do I make it so that it randomly pulls up answers that I have typed? If it works, I will kiss your feet! <_<

Edited by the shy guy, 24 September 2005 - 10:42 PM.


#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 25 September 2005 - 07:54 AM

well create an array with all your answers..
flash has the built in "random" function.
http://www.macromedia.com/support/flash/ac...tionary630.html
instead of inserting a number you could put the array.length

#3 Fade Away

    Young Padawan

  • Members
  • Pip
  • 52 posts

Posted 25 September 2005 - 08:18 PM

on (release) {
 function ansGen() {
 generate = random(13);
 ans = ["Yes, of course",
 "Probably not",
 "Maybe",
 "No",
 "Don't count on it",
 "Yes",
 "Most likely",
 "Try back later",
 "Willy squirts",
 "FLIP NO",
 "Holy virgin saint Maria yes",
 "You wish",
 "Don't worry about it"];
 _root.textbox = ans[generate];
 }
 ansGen();
}

Maybe?

Yes.

Edited by Fade Away, 25 September 2005 - 08:18 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users