getDefinitionByName() works on Flex classes as well as Flash ones, but if you want something like

 

    getDefinitionByName("mx.controls.Button")

 

to work, you have to ensure that Flex's Button class is linked into your application's SWF. If you actually use the Button class somewhere, it will be. By contrast, the Flash classes are built into the Player and don't need to be used in the SWF.

 

Sorry for the late reply. I'm going through the 1700 posts to flexcoders while I was on vacation, and I didn't see a reply to this one.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Freiman
Sent: Tuesday, September 05, 2006 7:50 AM
To: flexcoders
Subject: [flexcoders] getDefinitionByName

 

I want to use getDefinitionByName in the flash.utils package to get a class by it's name.  I've tried the example in the language reference using Sprite and that works fine but when I use flex classes it doesn't seem to work (I've tried classes I've made and mx.controls.ComboBox).  Is there a limitation of this function that I'm missing?

Dan

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to