≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
help me in this script
Posted by:
(you are not logged in)
Enter the missing letter in: "Inte?national"
(you are not logged in)
Text:
[quote][b][/b] wrote: brother please help me i am too noob in js i only know little bit of C iam making an android game and i want to zoom scope when user press on a 2d overlay so i used function (camera zoom with right click) and then used 2d touch button but its not working on android i guess its because of mouse button thats why i requested to change right mouse button in script to any other keypad button maybe this will work behavior_CameraZoomByMouseButton.prototype.onMouseEvent = function(mouseEvent, mouseWheelDelta) { if (mouseEvent == 5) { // right mouse down this.targetZoomValue -= mouseEvent * this.ZoomSpeed; if (this.targetZoomValue > this.MinZoom) this.targetZoomValue = this.MinZoom; if (this.targetZoomValue > this.MaxZoom) this.targetZoomValue = this.MaxZoom; } if (mouseEvent == 4) { // right mouse up this.targetZoomValue += mouseEvent * this.ZoomSpeed; if (this.targetZoomValue < this.MinZoom) this.targetZoomValue = this.MinZoom; if (this.targetZoomValue < this.MaxZoom) this.targetZoomValue = this.MaxZoom; } }[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact