Sorry about the title of this post, but I didn’t find it easy to make a descriptive title.
What I’m trying to do, isn’t a huge project, and I don’t believe it’s infinitely complicated. I just can’t seem to wrap my head around it at the moment.
Hard enough to explain what I want…
Try to picture this:
Flash file opens up.
There are 6 text fields on the screen.
You enter the number 30 into a text field located near the top and press a button.
The 5 remaining text fields suddenly have numbers in them:
[LIST]
[*]Field 1: 30
[*]Field 2:8
[*]Field 3:9
[*]Field 4:3
[*]Field 5:5
[*]Field 6:5
[/LIST]
The idea is that I need a piece of code that will divide a variable amount of ‘points’ between a variable number of text fields. But not only does it have to be divided it has to be randomly and often unevenly divided.
So X = Number of text fields X / 30
Won’t bring about the desired results.
I think I can (but haven’t tried) divide 30 evenly easy enough, but since thats not what I’m after…
Any suggestions?
Seems to me that the final code will be one of those ‘Wonder why I didn’t see that’ sort of things. But I can’t get it.
Thanks for your help.
-Lem