Panning

http://dreamsyntax.org/patterns/swf/panning.swf

This is a lovely effect you can put into your flash files to give some perspective. It will also help you understand how stageWidth/Height, mouseX/Y, and the object's width/height and x/y position can interact and influence each other to give a realistic sense of motion.

 mountain.addEventListener(Event.ENTER_FRAME, panning);

function panning(evt:Event):void{ var XdistanceMultipler:Number = mouseX / stage.stageWidth; evt.currentTarget.x = -XdistanceMultipler * (evt.currentTarget.width - stage.stageWidth); var YdistanceMultipler:Number = mouseY / stage.stageHeight; evt.currentTarget.y = -YdistanceMultipler * (evt.currentTarget.height - stage.stageHeight);

} 