for the most part but – there will be some multipling and such too… so grab a coke and the donuts this is going to be a doosey… snirt
in step 1
rate of pay x hours worked + benefits = total
in step 2 for 'per project’
hours needed x rate (this amount is static and wont change) = total
----- and ----- (this is where it gets complicated)
for 'monthly retainer’
hours retained (wether being 15, 25 or 40) the valules are going to change
15 hours = 23.00 an hour
25 hours = 21.00 an hour
40 hours = 17.50 an hour to give the amount in the rate box and then give a total
in step 3
total from step 1 minus the totals is step 2 to give a value for step 3
i know it seems a little confusing, i hope i explained it well enough
Well I see you are using var names for your textboxes, so that is easy enough. An example (of adding them all, just as an example) would be (on a frame) like this…
[AS]total1 = rate1+hours1+taxes+fourOhOne+pto+misc[/AS] I had used “fourOhOne” because you can use numbers for a var or instance name.
So basically on a frame you would want to make a function to do this… something like… [AS]function getFinalValue(){
total1 = doThatEquationThingHere;
total2 = doItAgainHereForTotal2Textboxes
total3 = whateverHere
}[/AS] Then you can create a submit button and call it like this [AS]on (release){
getFinalValue();
}[/AS]
okay - i have it working — but i have another question. is there a way to automatically display a value when another value is entered in on another box
here’s an example
if a user inputs “15” into box 1 i need for it to display “22.00” into box 2 – or if they enter in “25” – it displays 20.00 etc
(ps – here is the form in action so far, minus the graphics the text in blue is the hours to be manually entered and the text in yellow is what i need for it to automatically display)
thanks
(oh and one more thing — is it possible to set it up where when the user inputs something other than a numeriacl value – a message pops up saying " please enter numberic values only"
i am assuming it works on an “if” statement. i just dont know how to write the script)
Problem 1: Use an onChanged dynamic event handler for each textbox. For this you will need to give your textboxes an INSTANCE name (in the properties panel) and target it like… [AS]textBoxInstanceName.onChanged = getFinalValue;[/AS] That will then run the getFinalValue function whenever the content of the textbox changes.
Problem 2: The wonderful world of restrict. Again, the textbox will need an INSTANCE name. Then you can run it like [AS]textBoxInstanceName.restrict = “0-9”;[/AS] That will only enable you to use the characters 0 through 9 in that textbox.