I'm going insane with an external actionscript file I've written. I'm trying to create dynamic forms and so have writen functions to add text fields, move components, etc to create the form layout. Sometimes it just doesn't seem to call the functions right. For example I have
currentForm.addFormText(movieLevel, "riskFactors2", "Additional Risk Factors", 50, addYSmall, myFontBold);
which just adds a textfield named "riskFactors2", with text "Additional Risk Factors" at an X coordinate of 50 and adds addYSmall after it as a spacer. This works great. Right below that i have the same function call within a loop.
for (i = 0; i < 10; i++){
if (risk_rs[5].getItemAt(i).pk_newRiskFactors < 6)
{
currentForm.addFormText(movieLevel, "risk" + i, risk_rs[5].getItemAt(i).DisplayNewRiskFactors, 15, addYSmall, myFontNormal);
}
}
which just compares data from the database (pk_newRiskFactor is the primary key, and DisplayNewRiskFactor) is the text, and displays it if the primary key is less than 6. This does not display anything, yet I know the function is called because the space for the text appears, just no text. I've had similar issues that calling functions work great until I put it in a loop of some sort.
Any ideas? I"ve been going insane here
Thanks
Beth
currentForm.addFormText(movieLevel, "riskFactors2", "Additional Risk Factors", 50, addYSmall, myFontBold);
which just adds a textfield named "riskFactors2", with text "Additional Risk Factors" at an X coordinate of 50 and adds addYSmall after it as a spacer. This works great. Right below that i have the same function call within a loop.
for (i = 0; i < 10; i++){
if (risk_rs[5].getItemAt(i).pk_newRiskFactors < 6)
{
currentForm.addFormText(movieLevel, "risk" + i, risk_rs[5].getItemAt(i).DisplayNewRiskFactors, 15, addYSmall, myFontNormal);
}
}
which just compares data from the database (pk_newRiskFactor is the primary key, and DisplayNewRiskFactor) is the text, and displays it if the primary key is less than 6. This does not display anything, yet I know the function is called because the space for the text appears, just no text. I've had similar issues that calling functions work great until I put it in a loop of some sort.
Any ideas? I"ve been going insane here
Thanks
Beth