kdittyr
09-10-2009, 09:05 PM
The issue that I am having right now is that I am loading up to twenty very small modules based on dynamic data. This works fine, but it is slow to load as I have to wait for one module to completely load before I initiate the next module load. Also, it is wasting a lot of bandwidth to load the same module more than once.
My client would like me to, instead, load a module and use that as a Class Library. That would allow me to load a controls module once, then use that to create as many play buttons (or any other control) as I need. I have written a class that I have used on other, non-Flex, projects where I load swf's into my application and then call my getClass method which returns the requested class. public function getClass(_e:*, _class:*):Class
{
try{
var myclass:* = _e.target.applicationDomain.getDefinition(_class) as Class;
}catch(e:Error){
return null;
}
return myclass;
}
I am trying to use this with a module, or an application file, but cannot get it to work. The reason I am going for one of those is because my controls are extensions of Flex buttons, HSliders and so forth...
As it stands now, I have them working when they are just imported into my main application, but I am trying to see get something working that will last (dynamically) further than this single compile.
Does this make sense?
I am hoping someone can help point me in the right direction.
My client would like me to, instead, load a module and use that as a Class Library. That would allow me to load a controls module once, then use that to create as many play buttons (or any other control) as I need. I have written a class that I have used on other, non-Flex, projects where I load swf's into my application and then call my getClass method which returns the requested class. public function getClass(_e:*, _class:*):Class
{
try{
var myclass:* = _e.target.applicationDomain.getDefinition(_class) as Class;
}catch(e:Error){
return null;
}
return myclass;
}
I am trying to use this with a module, or an application file, but cannot get it to work. The reason I am going for one of those is because my controls are extensions of Flex buttons, HSliders and so forth...
As it stands now, I have them working when they are just imported into my main application, but I am trying to see get something working that will last (dynamically) further than this single compile.
Does this make sense?
I am hoping someone can help point me in the right direction.