Adding an Audio File to a Popup

The following tutorial and project shows how to add an audio file to a Hotspot Popup.

Project Folder

The ‘For Piero 0512-1200 Audio’ project folder has a new .p2vr and new.ggsk file in Project Files and in Assets to be loaded there is an audio sub-folder with an .mp3 file

 

Project Folder

 

Load Audio

  1. Add audio folder to the Output > Advanced > Assets list

 
 

Modifications to existing Project

1. Added a ‘Draw Video’ element to the skin

2. Video Properties are left at the default settings

3. Renamed the element as audio_playback

4. Wrapped it in a container cnt_audio to keep the tree clean

Draw Video Element added to the skin

5. Added a new Mouse Click Action to the Hotspot Template used for the popup

6. The action sets the value of the audio_playback element to the assets file pano2vr.mp3

7. The Action Filter uses the hotspot image name used in the Hotspot URL to determine which audio file plays.

New Mouse Click Action

Note: for each Hotspot Popup with an audio file add a new Mouse Click action with filter

8. Added a new Mouse Click Action to the cnt_popup_button_close container to stop the audio when the popup is closed.

Stop Media Action applied to the close button

9. Added the same Mouse Click Action to the rct_screentint_tint/opacity/blur elements to stop the audio when the popup is closed.

Stop Media Action applied to the screentint element