Jerry62712
03-11-2009, 02:43 PM
I'm thinking of going the "class" route (pun intended). My class months ago has a rather poor example, however.
In the application mxml file I have a namespace because the example has it. The file structure is:
src -> DHSComponents -> several component files
src -> DHSclass -> FSProcess.as
src -> DHScss -> style.css
src -> images -> several image files
src -> scripts -> FSCalc.as
src -> scripts -> FSCalcProcessData.as (processing class)
src -> FSCalc2.mxml (application file)
FSCalc2.mxml has:
xmlns:DHSComp="DHSComponents.*"
xmlns:FSProc="DHSclass.*"
The components are found so I'm assuming the class can be as well.
FSCalc.as has:
import DHSclass.*;
...
setResidentSize(residentSizeData.value);
...
resultResidentSizeData.text = getResidentSize();
"residentSizeData" is an object in the FSCalc2.mxml file in the default state. "resultResidentSizeData" is also there, but in a different state, obviously the result one.
FSCalcProcess.as has:
public function setResidentSize(resident:Number):void {
this.residentSize = resident;
}
...
public function getResidentSize():String {
var returnValue:String;
returnValue = residentSize.toString();
return returnValue;
}
What I need is:
1) connect this class to the AS file.
2) extend the processing in it so that I can access tables of standards and process them.
This last one would include applying data based on the number of residents in the household. I'm assuming that this would be bases on a new class that would accept the count and return a dollar value to the processing class which would return it to the application.
Any help would be greatly appreciated. Once I have this basic part f the system up, then I'll expand it to include each of the fields on the output. Finally, I'll get those standards from a database and eliminate the need to hard code it in the application.
Jerry
In the application mxml file I have a namespace because the example has it. The file structure is:
src -> DHSComponents -> several component files
src -> DHSclass -> FSProcess.as
src -> DHScss -> style.css
src -> images -> several image files
src -> scripts -> FSCalc.as
src -> scripts -> FSCalcProcessData.as (processing class)
src -> FSCalc2.mxml (application file)
FSCalc2.mxml has:
xmlns:DHSComp="DHSComponents.*"
xmlns:FSProc="DHSclass.*"
The components are found so I'm assuming the class can be as well.
FSCalc.as has:
import DHSclass.*;
...
setResidentSize(residentSizeData.value);
...
resultResidentSizeData.text = getResidentSize();
"residentSizeData" is an object in the FSCalc2.mxml file in the default state. "resultResidentSizeData" is also there, but in a different state, obviously the result one.
FSCalcProcess.as has:
public function setResidentSize(resident:Number):void {
this.residentSize = resident;
}
...
public function getResidentSize():String {
var returnValue:String;
returnValue = residentSize.toString();
return returnValue;
}
What I need is:
1) connect this class to the AS file.
2) extend the processing in it so that I can access tables of standards and process them.
This last one would include applying data based on the number of residents in the household. I'm assuming that this would be bases on a new class that would accept the count and return a dollar value to the processing class which would return it to the application.
Any help would be greatly appreciated. Once I have this basic part f the system up, then I'll expand it to include each of the fields on the output. Finally, I'll get those standards from a database and eliminate the need to hard code it in the application.
Jerry