Please try with swfLoader. From: I'm trying to load dynamically Flex
component at runtime from just the component's name (String). I succeed when I was using Flex2 Beta2 but this does not
work anymore with Beta3. Here is the code I am using: var urlRequest: URLRequest =
new URLRequest(); var context: LoaderContext =
new LoaderContext(); Then in handleLoadComplete: var viewClass: Class =
Class(loader.contentLoaderInfo.applicationDomain.getDefinition("mycomponent")); The error I get: InvalidSWFError: Error #2136: The SWF file
'http://localhost:8080/mysamples/core1.mxml.swf' contains invalid data. where core1.mxml.swf is the caller application. The Flex component mycomponent.mxml is just a VBox, nothing
else. When I try to access to the mycomponent.mxml.swf file Í'm getting
another error (I don't remember I got it with Flex2 Beta2): TypeError: Error #1010: A term is undefined and has no
properties. I don't know what happened between Beta2 and Beta3, does
anyone have any idea ? Thanks -- David Rousselie
|
- RE: [flexcoders] dynamically loading components Venu Vasireddy
- RE : [flexcoders] dynamically loading comp... ROUSSELIE David ROSI/SIFAC
- Re: [flexcoders] dynamically loading compo... Manish Jethani
- RE : [flexcoders] dynamically loading ... ROUSSELIE David ROSI/SIFAC