This is not possible as #include is a compiler directive. It is possible to load a SWF dynamically at runtime with additional classes, but I don't think you can load a new definition for a class that is already defined in an application domain. The following may be a little low level to jump into: http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/system/LoaderContext.html#applicationDomain
So I would search for examples on Flex modules, starting with Alex's blog entry: http://blogs.adobe.com/aharui/2007/03/modules.html Pete -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of sailorsea21 Sent: Wednesday, April 08, 2009 9:39 AM To: [email protected] Subject: [flexcoders] include ".as" file question. Hi everyone, is it possible to do something similar to this on the MXML file: include this[parentApplication.filename + ".as"]; I want to dynamically include an ".as" file depending on what is received from my AMFPHP object... If this is not possible, is there a simpler way to accomplish this? Thanks. -David ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links

