title: Flex: How to access movieclips within an imported swf
body: <p>I have imported a swf (not created with Flex, i.e. non-framework) into a Flex application.   Once loaded, I would like to access movieclips within that imported swf.   Looking at Adobe's docs (<a href="http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html</a>), it seems straightforward; however, their examples are between a Flex app and an imported swf (created with Flex).   </p>
  
  <p>Like their example, I'm trying to use the SystemManager to access the imported swf's content; however, I receive the following error: </p>
  
  <p><strong><em>TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@58ca241 to mx.managers.SystemManager.</em></strong></p>
  
  <p>Is this error occurring because I'm importing a non-framework swf into a framework swf?  Thanks in advance for any assistance.</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;
  
  &lt;mx:SWFLoader source="assets/test.swf"  id="loader"  creationComplete="swfLoaded()" /&gt; 
  
  &lt;mx:Script&gt;
   &lt;![CDATA[
  
    import mx.managers.SystemManager;
  
    [Bindable]
          public var loadedSM:SystemManager;
  
  
    private function swfLoaded():void 
    { 
     loadedSM = SystemManager(loader.content);
    } 
   ]]&gt;
  
  
  &lt;/mx:Script&gt;
  &lt;/mx:Application&gt;
  </code></pre>