title: Getting BitmapData from Embedded class
body: <pre><code>[ Embed('Assests/ui/Main.swf', symbol='backgroundImage')]
      private var background01:Class;
  
      private function getBitmapData(className:String):BitmapData
              {
                  var mc:MovieClip = (new background01) as MovieClip; 
                  if (mc == null) throw new Error('mc is null');
                  var myBitmapData:BitmapData = new BitmapData(mc.width , mc.height);
                  myBitmapData.draw(mc)
  
                  return myBitmapData;
              }
  </code></pre>
  
  <p>Hi there. I'm having a problem working this out. I want to return bitmapData from a symbol that is embedded in a flash swf file. background01 is the class name exported to as3 in the flash swf file.  As you can see from above I'm finding the swf with no problem. and I'm pullin the data back from the swf file with no prob. I can type addChild(new background01) and the image will show up. But when I've tried to cast to a bitmap , bitmapasset and movieclip. It always returns null. I want to get access to the bitmapdata of this image/movieclip. It should be returning a vertex circle drawn in flash and created to be a movieclip symbol. So what I would expect to be returned would be a MovieClip.</p>
  
  <p>Has anyone ever done this, and if so, could you provided some sample code..
  Thanks</p>
  
  <p>LinX</p>