Skip to content

Instantly share code, notes, and snippets.

View hivaga's full-sized avatar

Alexander Hadzhimitov hivaga

View GitHub Profile
@hivaga
hivaga / xmltoObj.as
Created April 13, 2011 07:52 — forked from nsdevaraj/xmltoObj.as
Converting XML to Object
// 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;
}
@hivaga
hivaga / build.xml
Created December 17, 2010 09:14 — forked from tpryan/build.xml
Ant build script that installs to Android Device and BlackBerry in the same build.
<?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>
@hivaga
hivaga / build.xml
Created December 17, 2010 09:12 — forked from tpryan/build.xml
Build a Blackbarrry and Android apps simultaneously with ANT
<?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>
@hivaga
hivaga / build.xml
Created December 17, 2010 09:11 — forked from tpryan/build.xml
Compile Flex with ANT
<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>
@hivaga
hivaga / NumberUtil.as
Created November 18, 2010 08:08 — forked from nsdevaraj/NumberUtil.as
Convert int to string 1 = one
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 ';