Hi,

Im running into an issue with Flex and need some help.

I have an action script application in flexbuilder. 
Here is the setup,

* interface named IScreen defined in the application
* Created a new mxml module(MyScreen.mxml) which is implementing the 
IScreen interface
* The main application's SWF has just the IScreen.as and the 
application.mxml
* The MyScreen.swf has the MyScreen.as and the related dependencies

Im trying to instantiate the class MyScreen from the 
application.mxml. Im loading the swf file using a ModuleLoader and 
once the module is loaded, Im trying to create an instance of the 
MyScreen using the getDefinitionByName.


I get the following error
Error #1065: Variable MyScreen is not defined.

I get this because MyScreen is a seperate module and not compiled 
into the main swf file. I dont want the MyScreen to be compiled into 
the main app as my requirement is that I dont know which 
implementation of the screen, I willbe loading in the runtime.

In Java I would just define the interface in the main application and 
then, load the class that is implementing the interface from the 
classpath and I should be able to call the methods in the interface.

Any thoughts!!!

I have a sample workspace showing this problem

Thanks for your time in reading this email.

Reply via email to