Any body has a suggestion how the Set Variable Action should look like when I would like to change the value of a variable to two digits behind the .. If this makes sense!?!
Example: the value of a variable is changed and will probably contain more digits behind the . Like 8.8743. When this occurs the variable should be set to the value of 8.87 so I can use it in a textfield for currencies.
Looking for a currency formatter? I've just recently completed 2 examples of this.
The first one is in Actionscript, and displays accurately up to 7 integers (and any number of fraction). I've included textfields for every part of the calculation to follow the code action...actual code could be simplified from this experimental edition.
Your suggestion worked Rosie. However sometimes 3 digits appeared behind the . so I changed the 1000 in 100 and this seems to work. Any comments on this!?
Your right Dickee it is for a currency formatter. I had a look on your site as I forgot about the situation in which only one digit behind the .appears. I see how you dealt with this. I always wonder how you guys put something like that together.
However I have to change my whole movie to do deal with it the way you did.
Can one of you just tell me how the if statement should look like to check if there is only one digit behind the . to make the converter complete. Or do I have to change the movie to deal with it the way you, Dickee, did?
Frame 4 says it all ( here it is in plain English):
Look at the 2nd last character in the rounded number.
If it's a ".", add "$" leading and "0" following displaynumber.
If not, add "$" leading displaynumber.
Loop through entire displaynumber.
If there is no ".", add ".00" following displaynumber.
If there is a ".", do nothing to displaynumber.
So as not to confuse the code, I've made a separate page to include a world currency exchange link, updated at 1:30 MST daily. At present, you must copy and paste your exchange result to input in order to format the number. I still must gather together a currency font set to format all of the final display numbers for all currencies. (and devise the code to set the function!)
--------- International Currency Calculator/Formatter