-
Hi guys,
I have this problem I hope somebody can help me, Before i tell u my problem let me explain my
project a little. I am creating a small feed back presentation where the user enters information about
his company and based on the formulas flash calculates & gives him the desired output.
In the first frame i have included null values for the text field variables where the user will feed in
the desired data and based on the data filled in flash will calculate a certain output. All the formulas
are placed in an external .as file which i have puled into flash using the include script.
My problem-Incase i enter all the values myself in the first frame of the action script then everything
is fine it calculates everything all right.
But if i leave the values as null the i enter the same values in the text field it does not do the
calculation it just displays as two chracters joined together. Butb when i trace the values entered it
shows all the right values entered.
Ex- I ask two question
1) How many hourly employees? 20
2) How many salaried employees ? 30
Now if i myself feed in these values in the action script where i have left a null enter
var total = 0;
var num = 0;
hourlyemployees = 0;
salariedemployees = 0; (null entry)
var total = 0;
var num = 0;
hourlyemployees = 20;
salariedemployees = 30; ( i filled it in the script)
The formula is written to add it the ans come write =50
But if i enter the values in the text field the ans = 2030
I have traced the values enter and they shoew write but the calculation does the it just puts the two
values together.
Please help with this problem another other clarification on this i am willin
-
not a big problem
just calculate
total=Number(hourlyemployees)+Number(salariedemplo yees)
milind
-
Hey Millend,
Thanks a lot, I have been cracking my head for almost a day.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|