   2D game camera in ActionScript 3.0
  I'm currently trying to learn ActionScript 3.0 and therefore I'm trying to create some prototypes. One thing that is driving me nuts is the fact that I do not know how to simulate a user controlled camera for a game. One of my theories that I have is that maybe I can save every object I want to pan with the camera in a list, and then give every object in the list an offset. So let's say that I have a level object and a player object in a list. If I drag the mouse cursor to the right I want these two objects to get a negative x-axis offset. How would I go about trying to create this kind of functionality?Maybe one of you talented bastards in these forums could give me an example?Either way, thanks in advance!   
  One way that I use to simulate a moving camera is to put all the panning objects inside a main "frame" Movieclip which sits on the stage.Then when you want to move the camera, you just move this main container in the opposite direction.If, for example, you wanted to let this camera follow an object, you would do something like so;mainmc.x = -object.x + flashwidth/2;mainmc.y = -object.y + flashheight/2;Where mainmc is the container movieclip.The flashwidth/2 and flashheight/2 are there to put the object in the center of the screen, rather than just the corner.   