Multiple sounds with various hotspots  

Share your tips and tricks here or get help with any Panotour problem!
No bug reports (of any kind) in this forum!
no avatar
jplavoie
Member
 
Topic author
Posts: 11
Likes: 0 post
Liked in: 0 post
Joined: Tue Jun 21, 2011 2:23 am
Info

Multiple sounds with various hotspots

by jplavoie » Tue Mar 13, 2012 8:02 pm

I need to activate a specific sound file when I click on different hotpsots (individual pictures) in a tour. When I click on a hotspot to show picture A, I need to listen to sound track A. For picture B, sound track B. Is it possible and any clue on doing this?

User avatar
bdd
Kolor Team
 
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

by bdd » Wed Mar 14, 2012 9:04 am

Hello Jean-Pierre,

You can not do it directly thru PTP, but it is quite easy to do it once the tour is built.

"Just" find the onclick attribute of the spots displaying your picture.
It should be something like that :

Code: Select all
onclick="closeallobjects();set(plugin[spot1object].visible,true);tween(plugin[spot1object].alpha, 1);"

There,
if you want to play a background sound, add something like the following :
Code: Select all
        playbackgroundsound(%BASEDIR%/mytourdata/sounds/sound0.mp3,0);

If you want to play a 3D sound, add something like the following :
Code: Select all
        playsound3D(mySoundID, mytourdata/sounds/sound1.mp3,359.006,0,90,1,0);

Then, you have to add the call to stop the sound in the "closespot1object" action :

If it is a background sound :
Code: Select all
        stopbackgroundsound();

if it is a 3D sound :
Code: Select all
        stopsound(mySoundID);

Gérald

no avatar
jplavoie
Member
 
Topic author
Posts: 11
Likes: 0 post
Liked in: 0 post
Joined: Tue Jun 21, 2011 2:23 am
Info

by jplavoie » Wed Mar 14, 2012 6:05 pm

Thank you Gérald for the info!

no avatar
MART
Member
 
Posts: 23
Likes: 0 post
Liked in: 0 post
Joined: Sat Sep 12, 2009 12:52 pm
Info

by MART » Fri Mar 16, 2012 11:04 am

Hi Jean-Pierre,
If I understand you correctly then I have a similar requirement and hope my solution is of some help , within a museum tour there are some paintings which I have made clickable to show just the painting with a descriptive narration.
In order to do this within PTP I have added the picture as a partial panorama with sound and a return to go back to the tour although this allows the addition of sound for each image to be applied directly within the PTP interface, it does just show the picture rather than the picture on top of the tour, which is my requirement,but does allow for a individual sound for each picture.


Who is online

Users browsing this forum: No registered users and 2 guests