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




__,_._,___

Reply via email to