Search code examples
actionscript-3apache-flexmovieclipdisplayobject

Get all frames from loaded swf in as3


I load external SWF with help MovieClipSWFLoader and add them to scene with addElement. So I know about frames total count and can navigate using nextFrame/prevFrame. I need to create panel with thumbnails which contains preview for each frame. How I can get each frame from MovieClip and store in array for example?


Solution

  • You should create a BitmapData object for each preview. Just iterate through each frame in your MC and use myBitmapData.draw(mc). Then create bitmaps: new Bitmap(myBitmapData); from each BitmapData and put them into your panel.