If the bitmap is contained inside the container, any transformations applied to the container should also be applied to the things contained within it.
I wouldn't apply any transformations to the bitmap, I'd apply them just to the container.
If the bitmap is contained inside the container, any transformations applied to the container should also be applied to the things contained within it.
I wouldn't apply any transformations to the bitmap, I'd apply them just to the container.
I'm not sure I've understood your question completely, but it's worth nothing that if you rotate a 100x200 object 90 degrees it will give 200x100 for width and height.
There's a number of ways to get around this, but I normally use scaleX/scaleY, as they are not affected by rotations, and multiply those with the original width/height of the clip.
I haven't grasped what you're trying to do 100% either, but I get the basic issue that the rotation you've applied is changing the tx/ty you need to use when applying your transform matrix.
On that basis perhaps this helps: http://www.senocular.com/flash/tutorials/transformmatrix/ Look at the section on "Manipulating Transformation Matrices", particularly the part about ignoring translation values with deltaTransformPoint. It's AS2, but hopefully the principles might get you on the right track.
FYI for anyone that might come along with similar problems. I solved my issue by explicitly setting the transformation matrix values and in this specific order scale, rotation then translation.
This was instead of copying the transformation matrix from the container. So instead of
var tMatrix:Matrix = _imgContainer.transform.matrix;
I am setting the values directly in this order:
tMatrix.scale (_imgContainer.scaleX, _imgContainer.scaleY);
tMatrix.rotate (_imgContainer.rotation * (Math.PI/180));
tMatrix.translate (_imgContainer.x, _imgContainer.y);
Thanks for the effort -
b