|
-
Random Name with Text File. Help
I want to make a random name selector for choosing pupils in class. The below works, but I was wondering if there was a way that I could set it up so that I could just copy and paste a list of names to the text file, ie have the " &name2 =" in the actionscript or in a different file. It would be so much quicker and useable for non IT staff.
This is what I have:
Action script:
loadVariablesNum("names.txt", 0);
count = Number(random(numvars)) + 1;
name = eval("name" add count) ;
stop();
text file:
name1= mary
&name2= john
&name3= peter
&name4= paul
&name5= sarah
&name6= charlie
&numvars=6
Any help would be gratefully received
Cheers
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
|