Update: This feature has now been added to flash 11.2. you can read more about it here: http://www.bytearray.org/?p=3755
While creating 3d environments within flash you are currently limited in the way you get user mouse input. In your traditional first person shooters moving the mouse will turn the view left and right, up and down. The problem you face within flash is that once the mouse hits the edge of the movie or if it is in full-screen mode, the side of the screen there is no way to receive mouse input as the mouseX and mouseY values to longer change, even if the user is still moving the mouse.
The first two videos below show methods which are achievable with the current functionality, the last video shows what would be possible if we had access to raw mouseOffset values.
AbsoluteDrag shows the view turning via the absolute location of the mouse. The problem with this method is that as soon as the cursor hits the side of the flash movie input stops.
AbsoluteClickAndDrag only turns the view when the user clicks and drags the mouse. This method continues to turn the view after the cursor has left the stage as long as the mouse button remains held down, however stops as soon as the cursor hits the side of the screen, it’s also not ideal for the user to always have to click and drag to turn as you would usually use the left mouse button as an action input (eg fire your gun).
RelativeDrag is my suggestion to this problem. With this extra functionality you could turn the view based on the raw mouse offset values, this way it doesn’t matter if the mouse is outside the flash movie or is even hard up against the side of the screen, the view will continue to turn. In the above example video this was achieved by opening a socket to a small c based program which broadcasts the mouse x and y offsets, however obviously you don’t want the user to have to download an extra program every time you use this kind of interaction.
1. Two new mouse properties: mouseOffsetX and mosueOffsetY, which would give you the displacement of the raw mouse data in the X and Y. These properties would output the raw offsets regardless of if the mouse was against one side of the screen or outside the stage.
2. Another option would be to make the mouseX and mouseY properties read/write. I realize there are potential security issues surrounding this approach as I am sure malicious sites would steal the users cursor, however if this was only available in full-screen mode or the user was prompted with a message similar to the microphone access message this approach could work.
The flash player team must be extremely busy with other issues, however this would be a really helpful addition to the player that would really open up the possibilities for 3d gaming environments.
If you think this added functionality a good idea and would like to support the request please visit the below url and cast your vote.