Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making a game where one takes a picture of their face to use on a character. I have them zoom in on the picture, but the bitmapdata extends out of its movieclip. How do I assign bounds to my bitmapdata?

share|improve this question
I decided to try getBounds – user25191 Mar 30 '13 at 4:41
...and it didn't work – user25191 Mar 31 '13 at 14:35
Since this task is not just relevant to games (I can imagine websites doing this) there may already be an explanation on the main StackOverflow. – jhocking Apr 3 '13 at 12:23

I think you need to dynamically create a shape with the x, y, width, and height of what you want to be visible, make it a mask and then add it to the display list in front of the bitmap data's movie clip. See this article on the subject.

share|improve this answer

Use the scrollRect property of your Bitmap. Here's the API documentation. You might also be interested in the following question/answer.

share|improve this answer
Thanks! I'll give it a try – user25191 Apr 5 '13 at 0:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.