Both Flash & Flex have a Loader component to load content into. It’s nice in Flash because it abstracts sizing & loading code. It’s even cooler in Flex because you can bind to contentPath.
However, if the content you are loading in Flash is an internal symbol, or embedded content in Flex (same thing), you will not get a “complete” event.
I find this wrong since expectations are, “I load content, I get an event while it’s loading, ‘progress’, and I get an event when it is completed, ‘completed’.” However, you only get these events for external content, like external JPEG’s & SWF’s. The documentation for both Flash & Flex versions does not state anything to the contrary.
Frankly, since this component abstracts the loading process, it should be up to the component omit events regardless of loaded content, or emit different events. This now requires the user of the component to know which content type they are loading.
This is an important distinction, because such low level details of whether something is an internal asset are not easily determined at runtime in both Flash & Flex. The more OOP something is, the less you know about where an asset came from. Simply adding the “Embed” metatag in Flex above an asset path, and it’s internal; your code doesn’t change.
Additionally, Flex abstracts control via binding. Since this connection is handled for you, one assumes (wrongly) that those bindings work without data inspection intervention.
What I’ve been doing is just checking if the asset I’m loading has a prefix of “__Resources” in it; if so, it’s an internal asset in Flex, and thus I must immediately call my complete event myself. Hack.