Jerry62712
03-09-2009, 10:15 PM
Currently, I have one .as file. I would like to have several so that each can do one function type. For example, I have a routine in the FSCalc.as file that populates a group of fields based on user input and calculations.
I would like that script to call FSCalcProcess.as where each field is taken and (eventually) processed and then returned.
It would look like this:
FSCalc.as
...
userHouseHoldSize.text = getUserHouseHoldSize();
...
FSCalcProcess.as
...
public function getUserHouseHoldSize():String {
some processing
return value
}
How do I make that function visible to the first script? How would I make other functions visible to the second script? The goal will be to get a bunch of standards from a database and use them against the input to find a result. Thus a house hold size of two might get $100 a month in benefits and one of three might get $150.
I would like that script to call FSCalcProcess.as where each field is taken and (eventually) processed and then returned.
It would look like this:
FSCalc.as
...
userHouseHoldSize.text = getUserHouseHoldSize();
...
FSCalcProcess.as
...
public function getUserHouseHoldSize():String {
some processing
return value
}
How do I make that function visible to the first script? How would I make other functions visible to the second script? The goal will be to get a bunch of standards from a database and use them against the input to find a result. Thus a house hold size of two might get $100 a month in benefits and one of three might get $150.