class FractionDisplay
{
    public static frac:Object = {"0": "0",
                                            "0.125": "1/8",
                                            "0.25": "1/4"};
}

To use:

import FractionDisplay;

trace(FractionDisplay.frac["0"]); // 0


----- Original Message ----- 
From: "Marcin Glowacki" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, November 12, 2005 10:16 AM
Subject: [flexcoders] How to create a static lookup hash with these values


How to create a static hash with these values?
fractionDisplay["0"] = "0";
fractionDisplay["0.125"] = "1/8";
fractionDisplay["0.25"] = "1/4";
fractionDisplay["0.333"] = "1/3";
fractionDisplay["0.5"] = "1/2";
fractionDisplay["0.667"] = "2/3";
fractionDisplay["0.75"] = "3/4"; 







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to