I need a button to stop the audio!  

Share your tips and tricks here or get help with any Panotour problem!
No bug reports (of any kind) in this forum!
User avatar
pu2wxp
Member
 
Posts: 172
Joined: Sun May 03, 2009 9:10 pm
Location: Campos do Jordao - Brasil

I need a button to stop the audio!

by pu2wxp » Tue Nov 30, 2010 7:34 pm

Can someone help me to create it?

I have a tour with four images, and have an audio for each image.

I need a button on the 4 pictures to put the audio on mute or stop!

Thanks for any help!
Luciano Correa
Vista Panoramica
Campos do Jordao SP Brasil

no avatar
mediavets
Moderator
 
Posts: 14167
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.

by mediavets » Tue Nov 30, 2010 8:27 pm

pu2wxp wrote:Can someone help me to create it?

I have a tour with four images, and have an audio for each image.

I need a button on the 4 pictures to put the audio on mute or stop!

Thanks for any help!

This is the documentation you need to hand code the features you want:
http://www.krpano.com/forum/wbb/index.php?page=Thread&threadID=375

Perhaps the best way of implementing this would be to create a custom theme and add a button to toggle sound but I wouldn't know how to code that function in detail.

Some hints:
http://www.krpano.com/forum/wbb/index.php?page=Thread&postID=4892&highlight=audio+on%2Foff#post4892

I have requested the ability to place a sound on/off button on theme navigation bars via the GUI but it has yet to be developed.
Last edited by mediavets on Tue Nov 30, 2010 8:37 pm, edited 1 time in total.
Andrew Stephens
Many different Nodal Ninja and Agnos pano heads. Merlin/Panogear mount with Papywizard on Nokia Internet tablets.
Nikon D5100 and D40, Sigma 8mm f3.5 FE, Nikon 10.5mm FE, 35mm, 50mm, 18-55mm, 70-210mm. Promote control.

User avatar
pu2wxp
Member
 
Posts: 172
Joined: Sun May 03, 2009 9:10 pm
Location: Campos do Jordao - Brasil

by pu2wxp » Wed Dec 01, 2010 12:30 am

I GOT IT!

mediavets wrote:
pu2wxp wrote:Can someone help me to create it?

I have a tour with four images, and have an audio for each image.

I need a button on the 4 pictures to put the audio on mute or stop!

Thanks for any help!

This is the documentation you need to hand code the features you want:
http://www.krpano.com/forum/wbb/index.php?page=Thread&threadID=375

Perhaps the best way of implementing this would be to create a custom theme and add a button to toggle sound but I wouldn't know how to code that function in detail.

Some hints:
http://www.krpano.com/forum/wbb/index.php?page=Thread&postID=4892&highlight=audio+on%2Foff#post4892

I have requested the ability to place a sound on/off button on theme navigation bars via the GUI but it has yet to be developed.

Hi Andrew,

I caught parts of the example of Krpano for directional sound, picked up other parts of the links you sent, customize the audio button and the result is that code:

As I had 4 different audios for each of the 4 images in tour, I needed to insert this code in each corresponding XML, of course changing the name of the MP3.
Code: Select all
<!-- sound buttom -->
    <plugin name="soundbutton" url="coloniadata/graphics/spots/soundonoff.png" align="leftbottom" x="10" y="10" alpha="0.65" scale="1.0"
        onover="tween(alpha,1);"
        onout="tween(alpha,0.65);"
            crop="0|50|150|50"
            onclick="action(playorstopsound); switch(crop, 0|0|150|50, 0|50|150|50);" />
    <!-- play stop sound -->
    <action name="playorstopsound">
    if(isplaying == true, stopsound(coloniadata/sounds/sound3); set(isplaying,false); , playsound(coloniadata/sounds/sound3, coloniadata/sounds/sound3.mp3); set(isplaying,true); );
    </action>
    <events onxmlcomplete="if(isplaying == true, stopsound(coloniadata/sounds/sound3);set(isplaying,false); );" />

************
And, I needed to erase at the top of each XML, this part of code that loads automatically the audio (this because I had entered the audios in Panotour Pro):
<events onloadcomplete="playbackgroundsound(coloniadata/sounds/sound0.mp3,1);"/>

************
Only in the main XML I put this:

<plugin name="soundinterface" url="coloniadata/graphics/soundinterface.swf" preload="true" keep="true"/>

************
All audios are turned off by default.
To listen just click to listen every audio in its image.
Take look (regrets that the audio does not work on iphone/iPad):

http://www.vistapanoramica.com.br/mobile/sindicato/colonia.html

Thanks
Luciano Correa
Vista Panoramica
Campos do Jordao SP Brasil

no avatar
mediavets
Moderator
 
Posts: 14167
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.

by mediavets » Wed Dec 01, 2010 12:46 am

I'm glad you got it to work so quickly.

To me the states of the audio button seem back to front.

I'd expect it to display "audio off" when the audio is playing - to imply that if you click the button the audio will turn off; and vice versa.
Andrew Stephens
Many different Nodal Ninja and Agnos pano heads. Merlin/Panogear mount with Papywizard on Nokia Internet tablets.
Nikon D5100 and D40, Sigma 8mm f3.5 FE, Nikon 10.5mm FE, 35mm, 50mm, 18-55mm, 70-210mm. Promote control.

User avatar
pu2wxp
Member
 
Posts: 172
Joined: Sun May 03, 2009 9:10 pm
Location: Campos do Jordao - Brasil

by pu2wxp » Wed Dec 01, 2010 1:11 am

uhauhahuahua

I swapped the order! I'm tired, I'll change it later.

thank you!
Luciano Correa
Vista Panoramica
Campos do Jordao SP Brasil


Return to Using Panotour / Panotour Pro 1.8

Who is online

Users browsing this forum: No registered users and 2 guests

cron