ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator Event listeners
person icon
bagg
Registered User
Quote
2010-10-26 18:32:45

Ok i will be waiting for the minor update with lights.

Now can you tell me how to declare mouse event listeners wich are taking place inside the 3d area in copperlicht?

in o3d is
o3djs.event.addEventListener(g_o3dElement, 'mousedown', Thefunction);

what is the opposite in copperlicht?

Thanks.

person icon
niko
Moderator
Quote
2010-10-27 07:45:19

You do it just like normal JavaScript: simply register the on mousedown and on mouseup events normally in your code. And additionally, if you want CopperLicht to handle mouse events as well, call handleMouseDown, handleMouseUp and handleMouseMove just described in the documentation here: http://www.ambiera.com/copperlic...
There are also some function which make this easier, for example getMouseX and getMouseY for simply getting the position of the mouse relative to the canvas.


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |