Don't know about a "custom flash command", but you can use the Flash Player virtual machine API (read: ActionScript) to sort of achieve the desired effect. What you need to do is loop through each frame with gotoAndStop
. Then you need to ask yourself - do your individual frames exhibit animation or are they static? If they are animated each as well, then you need to either ignore the animation and just take a snapshot at a "random" time, or you need to traverse that animation as well - call gotoAndStop
for the sub-movie clip as well. Let's assume your frames do not animate themselves, as it makes the whole method easier. You simply use BitmapData.draw on each of your frame content, copying its visual pixel data and thus caaching a frame of animation. You store your bitmap data objects as an indexed array, and create a timer which calls displaying of each such bitmap in succession. Essentially, you are then caching your timeline and reproduce the animation with your own "engine".
Alternatively, you can try to experiment with DisplayObject.cacheAsBitmap property, setting it to true
for whatever is displayed in your frames. Mind you, that would probably NOT be a smart thing to do if your individual frames exhibit animation, but try it out never the less - Flash Player could be smart enough to ignore your setting, as caching a snapshot of animation as a bitmap for a rapid animation may waste more memory than it brings any good