I am just wondering anyone know why Input.GetMouseButton()works properly in Unity Game play mode,but it doesn’t work after published and played using Unity web player.
Here is the code,
var horizontalSpeed = 2.0;
var verticalSpeed = 2.0;
var zoomSpeed = 2.0;
function Update (){
var cam_panX = horizontalSpeed * Input.GetAxis (“Mouse_PanX”);
var cam_panY = -verticalSpeed * Input.GetAxis (“Mouse_PanY”);
var cam_zoom = zoomSpeed* Input.GetAxis(“MouseWheel”);
if (Input.GetMouseButton(2)){
transform.Translate(Vector3.leftcam_panX);
transform.Translate(Vector3.upcam_panY);
}
transform.Translate(Vector3.forward*cam_zoom);
}
------------------------------------------------=
Appreciate for any replies.Thanks!
I dont think right clicking is ideal for web players, because right clicking is reserved for the web player menu, no?
I dont even remember if (2) is the right mouse button, if not, then disregard 
mousebutton(0) is left
mousebutton(1) is right
mousebutton(2) is middle
You can use right click no problem in a webplayer as long as you set the context menu to disabled to prevent it appearing on right click.
By default, the right mouse button is tied to the context menu in the webplayer. If you want to use it for your game, you need to add the disableContextMenu parameter to your HTML. Details are here: http://unity3d.com/support/documentation/Manual/WebPlayerBehaviorTags.html
(note: disableContextMenu is currently broken in Safari)
Input.GetMouseButton(2) refers to the middle mouse button, of course, but perhaps that too is masked by the context menu (not sure / haven’t tried).