Mouse Click and Mouse Over

Hi,
i have 3 situations wiht mouse events:

  1. the MOUSE OVER can´t play a media until manually i have clicked on it
  2. the MOUSE CLICK only is activated ON RELEASE the button but not ON PRESS it.
  3. I want to play a hidden audio resource in the scene, but the audio media controls are showed when is played.

This comments are related to the creation of a musical game.

Thanks in advance for your help

File attachedPRUEBA MUSICAL.zip (117.0 KB)

Hi Jairo,

Please share the project package (File > Save As > Package).
It’s much easier to find the issue with the project than with the HTML5 output.

Regards

Ok.

PRUEBA MUSICAL.saolapack (86.8 KB)

It’s all possible - but there are various issues:

  1. The audio file can be hidden - select the audio object and then expand the media panel on the right. Untick the controls option.

  2. The click trigger seems fine. However, on both the click and mouse over, you have text boxes over the object that has the trigger. The triggers only work correctly when used on the object as it won’t pass through the object above it.

  3. The mouse over trigger works but if you’re using chrome - it’s probably throwing an error (check the console) because you must interact with the document first.

  4. You’re running a scene activate script that has multiple errors. Probably best to fix these or comment them out while your testing.

1 Like

Hi,
thanks and please let me do some comments to your answer:

  1. … Good

  2. … Yes, i understand it but if you see, the click trigger only active the sound when release the mouse button and not when press it. In a music aplication (is my project) this is a problem because there is a delay in the initeraction. Is possible to program the PRESS and not the RELEASE?

  3. … yes, …“the user must interact with the document first”. Thanks

  4. … Errors? the idea here is: A) to pause the timeline B) hide the audio player (solved)

Hi Jairo,

If you want the mouse event occurs on press, please use Mouse Down event instead of Mouse Click event.
And you can double-click a div element on the canvas to add text to it, don’t need to add an additional text element over it.

About the scene activate error, I think @mackavi mentioned the script in sceneEventHandler function, not the Pause Timeline and Hide Element actions.

Regards

1 Like