I’m currently working on a flash game and I need to know how to addChild a BitmapData or draw a BitmapData to screen. If I can’t than how can I give a DisplayObject my BitmapData?
Share
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.
BitmapData objects cannot be added directly to the screen since they aren’t descendants of DisplayObject. If you’d like to display the contents of a BitmapData object, you’ll need to use a Bitmap, and it’s bitmapData property. If you’re using Flex, you’ll need to make sure that you’re placing the Bitmap into an instance of UIComponent or one of it’s subclasses. Otherwise, if you’re just using AS3 in Flash, this will do it: