This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// converting XML to Object | |
private function xmlToObject( xml:XML ):Object { | |
var xmlStr:String = xml.toString(); | |
var xmlDoc:XMLDocument = new XMLDocument( xmlStr ); | |
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder( true ); | |
var obj:Object = decoder.decodeXML( xmlDoc ); | |
return obj; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="AboutTime" default="" basedir="."> | |
<property file="settings.properties"/> | |
<!-- path to the flex task libraries. --> | |
<path id="flextasks.classpath"> | |
<fileset dir="${FLEX_HOME}/ant/lib"> | |
<include name="*.jar"/> | |
</fileset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="AboutTime" default="" basedir="."> | |
<property file="settings.properties"/> | |
<!-- path to the flex task libraries. --> | |
<path id="flextasks.classpath"> | |
<fileset dir="${FLEX_HOME}/ant/lib"> | |
<include name="*.jar"/> | |
</fileset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="compile"> | |
<echo message="Compiling swf"/> | |
<mxmlc file="${full path to the project File}" output="${Name for the compiled swf}"> | |
<load-config filename="${FLEX_HOME}/frameworks/airmobile-config.xml"/> | |
<source-path path-element="${FLEX_HOME}/frameworks"/> | |
<static-link-runtime-shared-libraries /> | |
<!-- Include this piece to pull in the Flex Framework or it won't compile. --> | |
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true"> | |
<include name="libs/*" /> | |
</compiler.library-path> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
public class NumberUtil | |
{ | |
//Usage: trace(NumberUtil.converToWords(numbers.text)); | |
private static const THOUSANDS:Array = ['','Thousand','Million','Billion','Trillion']; | |
private static const DECADES:Array = ['Twenty','Thirty','Forty','Fifty','Sixty','Seventy','Eighty','Ninety']; | |
private static const TENS:Array = ['Ten','Eleven','Twelve','Thirteen','Fourteen','Fifteen','Sixteen','Seventeen','Eighteen','Nineteen']; | |
private static const DIGITS:Array = ['Zero','One','Two','Three','Four','Five','Six','Seven','Eight','Nine']; | |
private static const HUNDRED:String = 'Hundred '; |