actionscript 3 - AS3 - looping through movieclips and rasterizing them to bitmapdatas - how to be sure frames are ready? -


I have already given a new version for a question, but the answer is not found.

I am developing a mobile AIR application with many animations and tests have shown that best performance is given in all mobile models using bitmap and GPU rendering. I get normal vector animations from app artists, and have created a system that hides in the runtime through these animations and pulls the content into bitmapads.

My worry is looping through the movie clip frame. If I have these lines of code:

 for  (var i: uint = 1; i & lt; mc.totalFrames + 1; i ++) {mc.gotoAndStop (i) ; BitmapData.draw (mc);   

I can not believe that the frame has been "created" before it is pulled, and my test with the Android tablet proves this right - Sometimes < / Strong> Frames are not drawn.

This MC is clearly off the display list (we do not need to render on screen). So is there a way to ensure that the frame is created before being featured in Bitmapdata? (And are waiting for FRAME_CONSTRUCTED, EXIT_FRAME, etc., obviously slow and unnecessary)

Any ideas? Thanx Saar

More information to clarify:

This is a children's book. Every page has animations in it. These are all animation vector animations that devloping Artists (not users) are in the FLA timeline. Each page has a FLA which is published to me on an SDF.

Which actually do I replace the Vodatine Animation with the bitmap version in the loaded SWFs. At the app runtime, on every new page, I load the SDF, though it creates raster in the array of all animation (looping through the children of the material) and each movie clips I get the bitmapetts array. My custom "Bitmap Movie Clip" for each movie clip on a display copy bitmap, and at ENTER_FRAME I switch the bitmaps bitmapdates to the array. It gives a very heated display

I recommend that you use a splash screen, and change it To keep your MC, go to the bitmap for the first step, then go to your bitmap data. On many issues, the display object was once dragged to the stage before the actual drawing, so it could be a quick fix for you.

  var splashBD: bitmapdata = new bitmapdata .stageWidth, stage.stageHeight, false, 0xffffff); Var splashbm: bitmap = new bitmap (splashbird); // drag here as a thing like addChild (splashBM); AddChildAt (MC_to_convert, getChildIndex (splashBM)); // then proceed from the frame and draw    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -