Screen Movement

Hi, i was wondering if anyone could help me.
i am using the engine in flex and cant figure out how to get the screen to move along with an object. in other words i have an object i want to move along and then i want the screen to move along with the object, so the object can be seen at all times.

BTW i am a total noob when it comes to AS3 and flash:(

thanks for your help!!

Mo
Make a DisplayObjectContainer (typically a Sprite or MovieClip) and attach all game sprites as children to it. I usually call this parent container my "camera". Attach the "camera" to the stage, and then do something like:
Code:
camera.x = screenwidth/2 - player.x;
at every frame.
Hi, thanks for the reply!

I was wondering if you could be a bit more descriptive, as i really have no clue when it comes to AS3 and Flex, i am a total newbie to all things Adobe haha

If possible could you give me a very simple amount of could i could work with?

Original thread: https://box2d.org/forum/viewtopic.php?t=1202