   [web] ActionScript 3 Multi-Part Sprites
  Hi,I am trying to create a simple Flash game.The player drives a tank which can rotate it's turret independent of the direction the tank is pointing. Just like a real tank can.To achieve this I have created a tank class that extends the sprite class.In the tank class I have two Bitmaps. I one for the tank body and one for the turret.The tank body is a (32,32) pixel image. I set it's (x,y) to (-16,-16) so that when it rotates to turn, it will rotate on it's centre and look correct.I then set the tank turret's (x,y) to (-7, -12) so that it sits on top of the tank in the right location.I can then drive the tank around and the turret follows correctly.The next step I take is to rotate the tanks turret bitmap as the player turns the turret. However it does not rotate around it's centre like the tank does but rotates off to the side.How do you place the tank turret so it sits in the correct spot on the tank but rotates around its own centre when turned?Many thanks!   
  I would suggest attaching the turret to a separate SpriteOnce attached, set the point around which the image will rotate:var turretSprite:Sprite = new Sprite();turretSprite.addChild( turretBitmap );turretBitmap.x = -7;turretBitmap.y = -12;Then, add it to the tank class and adjust the x and y coordiates so that it sits properly on the tank:tankClass.addChild( turretSprite );turretSprite.x = -7;turretSprite.y = -12;To rotate the turret:turretSprite.rotation += 5;Remember, an object rotates relative to its origin, which is not always its center.  So you'd have to attach an object to a parent and adjust it's x and y to place its center in the parent's origin, and then rotate the parent.Hope that helps :)   ;  Sounds good, I will give that a try tonight when I get home.Thanks!   