RE: [flexcoders] ClassUtil.Find Class and _global - Flex 2
1. If you know the fully-qualified name of a class that is linked into your SWF, you can create an instance of it as follows: import flash.utils.getDefinitionByName; ... var buttonClass:Class = Class(getDefinitionByName("mx.controls.Button")); var b:Button = new buttonClass(); 2. Instead of using _global, declare and use static constants, properties, and functions on any class, similar to Math.PI. For example, declare a MyData class, with vars like employees, then do import MyData; ... dg.dataProvider = MyData.employees; - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of karthikeyanik Sent: Tuesday, June 27, 2006 6:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ClassUtil.Find Class and _global - Flex 2 Hi, 1) In Flex 1.5, ClassUtil.findClass("className") returns the constructor Function of the given className. What is the equivalent function in Flex2.0. 2) _global has been removed in Flex2.0. What is the alternative? Thanks in Advance, Karthi __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] ClassUtil.Find Class and _global - Flex 2
Hi Karthi, take a look at the flash.utils package. There you can find replacements for findClass. Regarding _global - i have not tried it, since _global isn't good practice anyway, but in principle you should be able to place arbitrary declarations in the empty package. Cheers, Ralf. On 6/27/06, karthikeyanik <[EMAIL PROTECTED]> wrote: > Hi, > > 1) In Flex 1.5, > ClassUtil.findClass("className") returns the constructor > Function of the given className. What is the equivalent function in > Flex2.0. > > 2) _global has been removed in Flex2.0. What is the alternative? > > Thanks in Advance, > Karthi > > > > > > > -- > 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 ~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/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/
[flexcoders] ClassUtil.Find Class and _global - Flex 2
Hi, 1) In Flex 1.5, ClassUtil.findClass("className") returns the constructor Function of the given className. What is the equivalent function in Flex2.0. 2) _global has been removed in Flex2.0. What is the alternative? Thanks in Advance, Karthi Yahoo! Groups Sponsor ~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/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/