You are not logged in.

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


#1 2013-01-27 12:32:29

rjelli
New member
Registered: 2013-01-27
Posts: 1

sound hotspots "moving" on iOS

Hello there,

I have made a tour with multiple sound hotspots on one of the panoramas. You can find it here:

http://www.visit-360.net/visites/testsa … ltour.html

The hotspots are just regular hotspots with mp3 files attached to them.
Using the Panotour GUI, you can only assign one image to a sound hotspot. Furthermore, if you click on more than one image, all the sounds are playing together, which is not what I wanted.
I have updated the virtualtour.xml file in order to change the url of the image when starting and stopping the sound, and to close all playing sounds before starting a new one.

The original content was this:


     

Code:

<hotspot name="spot4" onclick="play();" play="closeallobjects();playsound3D(soundspot4,virtualtourdata/sounds/sound0.mp3,502.428,4.59574);set(onclick,stop);" stop="stopsound(soundspot4);set(onclick,play);" url="virtualtourdata/graphics/spots/speakeroff.png" ath="142.428" atv="4.59574" width="50" height="prop"/>

<hotspot name="spot5" onclick="play();" play="closeallobjects();playsound3D(soundspot5,virtualtourdata/sounds/sound1.mp3,486.467,7.18336);set(onclick,stop);" stop="stopsound(soundspot5);set(onclick,play);" url="virtualtourdata/graphics/spots/spot3.png" ath="126.467" atv="7.18336" width="50" height="prop"/>

...

I changed it into this:


   

Code:

 
<hotspot name="spot4" onclick="play();" play="closeallobjects();closeallmysoundsbut4();seturl4off();playsound3D(soundspot4,virtualtourdata/sounds/sound0.mp3,502.428,4.59574);set(onclick,stop);" stop="stopsound(soundspot4);seturl4on();set(onclick,play);" url="virtualtourdata/graphics/spots/speakeron.png" ath="142.428" atv="4.59574" width="30" height="prop"/>
<hotspot name="spot5" onclick="play();" play="closeallobjects();closeallmysoundsbut5();seturl5off();playsound3D(soundspot5,virtualtourdata/sounds/sound1.mp3,486.467,7.18336);set(onclick,stop);" stop="stopsound(soundspot5);seturl5on();set(onclick,play);" url="virtualtourdata/graphics/spots/speakeron.png" ath="126.467" atv="7.18336" width="30" height="prop"/>
...

The seturlxon and seturlxoff functions are used to change the icon when starting and stopping the sounds:


Code:

    
<action name="seturl4off">
        set(hotspot[spot4].url,"virtualtourdata/graphics/spots/speakeroff.png");set(hotspot[spot4].ath,"142.428");set(hotspot[spot4].atv,"4.59574");set(hotspot[spot4].width,"30");set(hotspot[spot4].height,"prop");
</action>

<action name="seturl5off">
        set(hotspot[spot5].url,"virtualtourdata/graphics/spots/speakeroff.png");set(hotspot[spot5].ath,"126.467");set(hotspot[spot5].atv,"7.18336");set(hotspot[spot5].width,"30");set(hotspot[spot5].height,"prop");
</action>

...

<action name="seturl4on">
        set(hotspot[spot4].url,"virtualtourdata/graphics/spots/speakeron.png");set(hotspot[spot4].ath,"142.428");set(hotspot[spot4].atv,"4.59574");set(hotspot[spot4].width,"30");set(hotspot[spot4].height,"prop");
</action>
<action name="seturl5on">
        set(hotspot[spot5].url,"virtualtourdata/graphics/spots/speakeron.png");set(hotspot[spot5].ath,"126.467");set(hotspot[spot5].atv,"7.18336");set(hotspot[spot5].width,"30");set(hotspot[spot5].height,"prop");
</action>
...

and the closeallmysoundsbutx method is used to stop all playing sounds before starting a new one:

   

Code:

<action name="closeallmysoundsbut4" >
        stopsound(soundspot5);set(hotspot[spot5].url,"virtualtourdata/graphics/spots/speakeron.png");set(hotspot[spot5].ath,"126.467");set(hotspot[spot5].atv,"7.18336");set(hotspot[spot5].width,"30");set(hotspot[spot5].height,"prop");
...
</action>

<action name="closeallmysoundsbut5" >
        stopsound(soundspot4);set(hotspot[spot4].url,"virtualtourdata/graphics/spots/speakeron.png");set(hotspot[spot4].ath,"142.428");set(hotspot[spot4].atv,"4.59574");set(hotspot[spot4].width,"30");set(hotspot[spot4].height,"prop");
...        
</action>
...

It all works fine in flash, it gives exactly the effect I was looking for, but unfortunately it gives a really weird effect on an iOS device: the small speakers seem to move randomly in the image: click on any sound, then move the image with the mouse, some of the speakers are coming along with the image, whilst others stay at a fixed place in the browser. I do not see any pattern in the movements, it really seems random to me.

Does anyone have a clue on what is going on, and how it would be possible to fix this for iOS output?

I tried already various things, like resetting the ath and atv positions of each hotspot when changing its icon, but nothing works

Thank you !

Last edited by rjelli (2013-01-28 10:02:50)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson