You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2010-11-30 19:34:41

pu2wxp
Member
From: Campos do Jordao - Brasil
Registered: 2009-05-03
Posts: 159
Website

I need a button to stop the audio!

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

Offline

 

#2 2010-11-30 20:27:38

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9724
Website

Re: I need a button to stop the audio!

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.p … readID=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.p … f#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 (2010-11-30 20:37:24)


Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.

Offline

 

#3 2010-12-01 00:30:35

pu2wxp
Member
From: Campos do Jordao - Brasil
Registered: 2009-05-03
Posts: 159
Website

Re: I need a button to stop the audio!

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.p … readID=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.p … f#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:

<!-- 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/mobil … lonia.html

Thanks


Luciano Correa
Vista Panoramica
Campos do Jordao SP Brasil

Offline

 

#4 2010-12-01 00:46:59

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9724
Website

Re: I need a button to stop the audio!

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
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.

Offline

 

#5 2010-12-01 01:11:51

pu2wxp
Member
From: Campos do Jordao - Brasil
Registered: 2009-05-03
Posts: 159
Website

Re: I need a button to stop the audio!

uhauhahuahua

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

thank you!


Luciano Correa
Vista Panoramica
Campos do Jordao SP Brasil

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson