Page 1 of 1

Play a sound on Polygon hotspot mouse click action

Posted: Sun Feb 04, 2024 3:53 pm
by atishay100
Hi,
I am trying to play a sound when some poly hotspot is clicked.
so I added a sound element into the skin with an id of sound1(loop -1) and a invisible text element to attach it's actions to poly hotspot by proxy hotspot id.
I added mouse click action to this text element which plays a media of id sound1 and set the loop to 1.
But it doesn't seem to play on the hotspot click.
can you please guide me.
Thanks in Advance.

Re: Play a sound on Polygon hotspot mouse click action

Posted: Fri Feb 09, 2024 12:56 pm
by atishay100
Hey community,

I just got a reply from support about playing the sound on mouse click action.
we have to add the sound files in the assets of the output.(assuming name of the file is sound.mp3)
we have to first add a video element to the skin, let' say with id of Video_1 (set it to autoplay in video element's properties ). ---> add a container with action on mouse click with set value as assets/<sound_file_name>.mp3 and target as the video element ----> add hotspot proxy id to it for connecting it's actions to hotspots.

Thanks Martin for the answer :) .
Best Regards.