i have 3 situations wiht mouse events:
- the MOUSE OVER can´t play a media until manually i have clicked on it
- the MOUSE CLICK only is activated ON RELEASE the button but not ON PRESS it.
- 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)
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.
It’s all possible - but there are various issues:
The audio file can be hidden - select the audio object and then expand the media panel on the right. Untick the controls option.
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.
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.
You’re running a scene activate script that has multiple errors. Probably best to fix these or comment them out while your testing.
thanks and please let me do some comments to your answer:
… 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?
… yes, …“the user must interact with the document first”. Thanks
… Errors? the idea here is: A) to pause the timeline B) hide the audio player (solved)
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.