If I run cacheAsBitmap = true on a complex Sprite the caching can sometimes take up to a second.
Is there any way to check for when a DisplayObject has finished being cached?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nope, there is no possible way. However, cacheAsBitmap is using a system of creating a Bitmap object under the hood. This bitmap gets drawn with the pixel information of the DisplayObject. Hence, if you desire a fine-grain control over how cacheAsBitmap works, I would say that you should instead use Bitmap/BitmapData directly, instead of using a Sprite/MovieClip with the cacheAsBitmap feature. Hope this helps!
This article should help you if you do not know how to work with Bitmaps:
http://www.flashgameblog.at/blog-post/2010/04/08/blitting-the-art-of-fast-pixel-drawing/