Page 1 of 1

Random Sentence

Posted: Tue Oct 30, 2007 5:25 pm
by creyentededios
So heres my story

i have a flash file, and in it i have a text box

what i would like it to do is every time someone opens the flash file a random "law" is put in a text file
and then i have a button that when clicked would change the law to another law

is there a php code i could use?
i have 120 different "laws" that i would like it to choose from random one of them

also, there are some laws i would like to skip, so numbers i would like to skip, how can i do that?

thanks for your help!

Posted: Tue Oct 30, 2007 11:26 pm
by Stryks
I have no experience at all with the flash part of things, but it seems that all you want is a script to pull a random line of text and put it in a txt file.

Should be easy enough.

How are the laws stored? Text file? Database? If you want to ignore specific numbers, how are you planning to tie the law to the number ... or are they already numbered somehow? If so, what is the format?

If in a text file, give an idea of the format. Actually .. same if it's database based - table structure etc.

Cheers

Posted: Tue Oct 30, 2007 11:27 pm
by GeXus
That would all be done in flash.

Posted: Tue Oct 30, 2007 11:31 pm
by Stryks
Well then ... I cant help ... :lol:

Posted: Wed Oct 31, 2007 3:09 pm
by creyentededios
well i have a php file, im actually gettin help already

thanx though

i need help with this other thing:

viewtopic.php?p=426118#426118

if you dont mind takin a look