Loading Flash assets ignore timeline AS3

Ok, a little background…

First off, this is an app in Flex, and we need to load assets at run-time based on data provided. Hopefully this is the right forum, and someone can help… if not, please direct me to the right place…

My project is under NDA, and it would be super difficult to provide a test-case app based on the complexity of everything, so hopefully I can describe it all well enough to make sense to someone…

I have a complex application that utilizes Flex Modules, and the modules request from the core app to load resources. Modules, and resources alike, are told to load in the Application.currentDomain. If I don’t do this, I get silly things like “cannot covert com.mydomain.somePackage.ClassName@89298 to com.mydomain.somePackage.ClassName”… as you can see one has a memory address, and the other does not. This is usually indicative of exclusive ApplicationDomain’s, which has it’s own set of class mappings. Essentially even though they’re the exact same class, Flash Player will identify them as separate sets of classes and thus not the same. More info here: http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_5.html and http://livedocs.adobe.com/flex/3/html/help.html?content=modular_2.html

I have a doc class for a flash file that extends MovieClip; let’s call it MCExtended. When I load the object, I can see that it is indeed of type MCExtended; If i access members of the doc class (such as setters) dynamically (e.g., myLoadedClip[‘someTextVal’] = “blah”) it works perfectly fine. Obviously to access it directly (e.g., myLoadedClip.someTextVal = “blah”) I need to cast the object… However when cast it, it ignores AS3 timeline code (event dispatches, stops, nothing more). So the clip just keeps looping, and my Flex app never receives the event to act on. I have verified that the class mapping is identical by reaching into the loaderInfo.appilcationDomain and calling getDefinition for the qualified class name.

If i take my app out of the equation, and simply load the item and use my view, it works fine - so something in the ApplicationDomain is causing issues.

What’s even MORE strange, is that I’m doing this perfectly fine with other classes, and don’t notice any problems with those, but a select few don’t work properly. The settings are identical, and the doc class is constructed in the exact same way - yet some just simply ignore all AS3 timeline code and infinitely animate, and refuse to let me know when it’s done playing the movie clip (so my view can remove the clip from the stage — these are instructional animations)

One last thing to note, is if you look at the module overview link I supplied, you’ll see where it speaks about Module Domains, and how to work around the singleton issues by importing them in your core application. I have a feeling this is the culprit, but can’t figure out which singleton I’m missing…

FYI, I am currently importing the following managers:
import mx.managers.DragManager; DragManager;
import mx.managers.FocusManager; FocusManager;
import mx.managers.PopUpManager; PopUpManager;
import mx.styles.StyleManager; StyleManager;
import mx.styles.CSSStyleDeclaration;

Also, I have attempted to import my MC’s class to no avail.

Please for the love of god, help me out… I’ve been at this for months now, and it’s to the point where I need to go to production in a week, and this could blow up in my face.