PDA

View Full Version : [AS2] making a 3d like FPS shooter in 2D


BMGP
10-31-2010, 10:10 AM
Hi!
I use this Code to move my background that it looks like you would look around:


onClipEvent(enterFrame){
Mouse.hide();
this._x = -_root._xmouse+1200;
this._y = -_root._ymouse+675;
}

Stage Size: 800 px * 450 px

The bg has to be 1600 px * 900 px - So i made the background with a "border" (-> Wood for hiding). At the moment you can aim on the wood pieces till you get out of the flash file. But i only want that you can aim in the middle of the Flash File - not the wood pieces - So when you hit the wood pieces when you look to far left,right,up,down the background should further and my crosshair should stay at the begin of the wood pieces!
Hope you understand it ;) - Its difficult to explain ^^

How can i do this?

bluemagica
11-01-2010, 04:41 PM
just check something like if this.x>1600 this.x=1600;......basically just reset it if it seems to move out.