Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2012, 09:53 AM
africano africano is offline
Member
 
Join Date: Jul 2008
Posts: 84
Downloads: 0
Uploads: 0
Default mp3 audio linked to panos - play/stop

Hi,

Ive got mp3 audio files linked to all my panos in tour. Each time a pano loads a different mp3 file is loaded. How can I make a button so that if pressed the audio is stopped?

Can I make one button that controls all the mp3 files, say I make a button in my menu to mute or stop the mp3 background sound. So when clicked it stops the audio...and this button does the same on all panos?

Onclick function?

thanks!
Reply With Quote
  #2  
Old 02-09-2012, 11:56 AM
africano africano is offline
Member
 
Join Date: Jul 2008
Posts: 84
Downloads: 0
Uploads: 0
Default

Tinkering around Ive come up with something workable.....Ive setup a button which stops the audio from playing. this works well.

So each pano loads a different mp3 audio file and if the button is pressed it stops the audio which is playing.

Problem is that if I view first pano and decide to stop the mp3 file from playing and then load the second pano....the mp3 file from this pano is also stopped and therefore wont play...I therefore have to press the audio button to start the mp3 file.

How can I do it so it works like its working now, but if a new pano is loaded the audio is on even though I turned it off in another pano?

here is some of my code so far:

this is declared in the onStart:

set_stop_audio();

.............................

stop_audio="
"
stop_audio_1="
calahorra.soundVolume=0;
park.soundVolume=0;
playa_entrada.soundVolume=0;
playa.soundVolume=0;
chiringuito.soundVolume=0;
stop_audio=stop_audio_2;
"
stop_audio_2="
calahorra.soundVolume=0.3;
park.soundVolume=0.3;
playa_entrada.soundVolume=0.3;
playa.soundVolume=0.3;
chiringuito.soundVolume=0.3;
stop_audio=stop_audio_1;
"
set_stop_audio="
stop_audio=stop_audio_1;
"


this part is applied to the first pano:

onPress="
stop_audio();
"
onRelease="
stop_audio();
"

this is applied to the stop hotspot:

onClick="
stop_audio();
"


I guess a solution would be to make this type of function for each pano, but is there an easier way?

thanks!
Reply With Quote
  #3  
Old 02-09-2012, 12:39 PM
africano africano is offline
Member
 
Join Date: Jul 2008
Posts: 84
Downloads: 0
Uploads: 0
Default

Ive decided to stick with my solution, creating a change in state of the audio button to show that the audio is OFF.

Now I want to turn off the mp3 files when a swf viewer is launched....

this is my code for the onClick command on the viewer:

onClick="banner.alpha=0;bannerBtn.visible=1;close. visible=0;banner.staticX=900.00;banner.staticY=-300.00;external.autorotator.disabled+=0; pano.blur=0,300"

how do I do it so that when that is clicked as well as the functions already attached it stop the audio as well?

adding the stop_audio(); function doesnt seem to work...??

thanks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:09 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.