dcullinane
07-05-2004, 03:25 PM
Hi All,
I have just created a flash app with 4 combo boxes. Each time something is selected from the combo box a corresponding 2/3 digit number is displayed in a dynamic text box. Each of the 4 combo increments the digits in the text box until you end up with a 9 digit number.
However, if the user selects an option from the combo box which has a corresponding 2 digit number beginning with "0" then only the second digit is displayed.
eg. instead of "03" just "3" is displayed etc.
Any ideas? has anyone come across this issue before?
heres my code:
function checkCombo()
{
some_txt.text = "";
var switchNo;
for (i=1; i<=1; i++) {
switchNo += _root['combo'+i].getSelectedItem().data;
if (switchNo < "50") { gotoAndStop(2);}
else { gotoAndStop(4);}
trace(switchNo);
}
for (i=1; i<=4; i++)
{some_txt.text += _root['combo'+i].getSelectedItem().data;
}
}
stop();
thanks,
dcullinane
I have just created a flash app with 4 combo boxes. Each time something is selected from the combo box a corresponding 2/3 digit number is displayed in a dynamic text box. Each of the 4 combo increments the digits in the text box until you end up with a 9 digit number.
However, if the user selects an option from the combo box which has a corresponding 2 digit number beginning with "0" then only the second digit is displayed.
eg. instead of "03" just "3" is displayed etc.
Any ideas? has anyone come across this issue before?
heres my code:
function checkCombo()
{
some_txt.text = "";
var switchNo;
for (i=1; i<=1; i++) {
switchNo += _root['combo'+i].getSelectedItem().data;
if (switchNo < "50") { gotoAndStop(2);}
else { gotoAndStop(4);}
trace(switchNo);
}
for (i=1; i<=4; i++)
{some_txt.text += _root['combo'+i].getSelectedItem().data;
}
}
stop();
thanks,
dcullinane