actionscript-book-WikiEditor-com-example-programmingas3-wikiEditor-CurrencyConverter.ax [swf] flex
Displays a round clock face with an hour hand, a minute hand, and a second hand.
Converts strings of US dollar values (such as "$9.95") to Euro strings (such as "8.24 €".
A regular expression matching a pattern for a US dollar value. A
Replaces the matching dollar strings with the Euro equivalent string. The second parameter defines a function, used to define the replacement string.
Called as the second parameter of the replace() method of a String. As such, the call passes the following parameters: - The matching portion of the string, such as "$9.95" - The parenthetical match, such as "9.95" - The index position in the string where the match begins - The complete string This method takes the second parameter (args[1]), converts it to a number, and then converts it to a Euro string, by applying a conversion factor and then appending the € character.
(C) Æliens 27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.