Hey guys,
I'm currently making a bitmap copy of a movieclip and adding it to the screen. The problem I am having is positioning the image the same as the movieclip.
What I mean is currently I have a character which is a movie clip. The origin of the movieclip is set to the bottom middle of the character. Now when ever you copy a movieclip to a bitmap the origin is now the top right corner of the image.
I could simply use bitmap.x -= width / 2; bitmap.y += height;. But here is the next problem.
I have attached bitmaps inside the movieclip and the new bitmap takes this into account even transparent pixels (i know how to ignore these). The character movie is positioned at the middle of its feet manually so this doesn't take into account the attached bitmaps on the character. So the character could be 60px wide but 40px to the left of the origin and 20px to the right and the feet would still be on the origin. So because of this bitmap.x -= width / 2; bitmap.y += height; wont put the feet in the middle but rather place the origin at the middle of the bitmap.
Now I could simply attach the movie clip instead but for performance reasons I need it to be a bitmap.
Is there anyway to translate the origin exactly/
Sorry if this doesn't make sense. I can try re explain if need be.




Reply With Quote