Hi, I think, if you prefix with base level dir, Flex compiler resolves the reference and compile the class into main swf....
I remember, there was a way to dynamically load an AS2 class in Flash. You compile the stub class in your main app and on runtime load the a swf into main app, this swf contains the complete implementation of the class. Once swf is loaded, you create object of the class... Makes sense? I guess, something similar might be helpful in your case.... Not able to find that thread, even forgot which mailing list it was discussed.... -abdul -----Original Message----- From: Scott Barnes [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 12:40 PM To: [email protected] Subject: [flexcoders] Re: createChild dynamically via DB arguments.. better yet: say you have a situation like this var x = com["str1"]["str2"]["str3"]; container.createChild(x); that works ok. but... if if i try ["com"]["str1"]["str2"]["str3"] it doesn't. My question is, how does "com" come into the equation, is it some kind of FLEX mapping? dir structure is /com/ /com/SynerygFLEX/ etc.. I'm trying to have it so that i can instantiate a dynamic class path on the fly. It works if i prefix it with some base root level dirs eg: /com/ /blah/ /de/ /au/ these would work: com["str1"]["str2"]["str3"]; blah["str1"]["str2"]["str3"]; de["str1"]["str2"]["str3"]; etc ... but i kind of need to go _whateverThisObjectIs["com"]["str1"]["str2"]["str3"] or _whateverThisObjectIs["blah"]["str1"]["str2"]["str3"] Any help? On Apr 6, 2005 3:36 PM, Scott Barnes <[EMAIL PROTECTED]> wrote: > Can I quickly confirm something? > > In order to use createChild(classPath) that initial classPath has to > be included before runtime correct? in that you cannot instantiate a > custom MXML component unless you either xmlns: / import it? > > In saying that, if you have a situation where you want to via an > onClick instantiate a MXML component thats path came from a DB, its > not dooable as the FLEX server will need to know about this class > upfront...that or you have to use attachMovie(your.mxmlFile.mxml.swf) > > ? > > > -- > Regards, > Scott Barnes > http://www.mossyblog.com > http://www.flexcoder.com (Coming Soon) > -- Regards, Scott Barnes http://www.mossyblog.com http://www.flexcoder.com (Coming Soon) Yahoo! Groups Links 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/

