How to add an action to a hotspot?

Q&A about the latest versions
Post Reply
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

I'm sorry if it is not particularly obvious to me from looking at the tutorials, documentation and searching the forums how to do this-

I have a hotspot and a directional sound that I have added to my panorama using the hotspot editor. I wish for the user to click on the hotspot in order to play/toggle the embedded directional sound. Is there no way to add an action in the hotspot editor to the hotspot in order to do this? If this needs to be done through the skin editor, then how am I to address both the hotspot and the embedded directional sound that I have added?
User avatar
k.ary.n
Gnome
Posts: 615
Joined: Wed Aug 15, 2007 1:02 pm

If I understand correctly, you've added sound via the sound editor and a hotspot via the hotspot editor and you would like to "connect" the two. Currently, or at least to my knowledge, you cannot "connect" the sound (via the sound editor) with a hotspot (via the hotspot editor).

If you want a sound to play when someone clicks on a hotspot (added via the hotspot editor), then you need to do some work in the Skin Editor. If you added a point hotspot, you can follow the directions outlined here to get started.

To add sound to the hotspot, drop in the sound to the skin editor window and in the hotspot template call the action to play that sound. For example: source = mouse click; action = play sound; target = sound's ID. (check out the video tutorial at about 8 minutes into the video. There is a short description about adding sound via the skin editor.)
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

k.ary.n wrote:If I understand correctly, you've added sound via the sound editor and a hotspot via the hotspot editor and you would like to "connect" the two. Currently, or at least to my knowledge, you cannot "connect" the sound (via the sound editor) with a hotspot (via the hotspot editor).
No, if you add the sound via the sound editor as a "background sound" you can. This is currently how I have it working, and the reason I am wondering why it is not possible to connect to the other (directional) sounds added through that same interface.
k.ary.n wrote:If you want a sound to play when someone clicks on a hotspot (added via the hotspot editor), then you need to do some work in the Skin Editor. If you added a point hotspot, you can follow the directions outlined here to get started.
I wish to use a polygon or area hotspot, not a point. Why are these treated differently?
k.ary.n wrote: To add sound to the hotspot, drop in the sound to the skin editor window and in the hotspot template call the action to play that sound. For example: source = mouse click; action = play sound; target = sound's ID. (check out the video tutorial at about 8 minutes into the video. There is a short description about adding sound via the skin editor.)
And if I want that sound to be directional?
User avatar
Hopki
Gnome
Posts: 13022
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi
What sound is it?

I am not in front of my computer at the moment but try this.
Set an area hotspot, if it is hotspot 1, it's ID will be 1.
Set a directional sound the sound editor, give it a volume of 0.

In the skin make a rectangle any size, 10 x 10 is good. Set to have no border and set its alpha to 0.
Give it action, mouse enter, set volume, sound ID,.

Set its Hotspot Proxy ID to 1.

the rectangle will not been seen as it is has an alpha of 0, but its actions will still work.
When your mouse enters the area hotspot, the proxy id links it to the rectangle and activates the actions you set in that.

As said I can not test this but I can not see why this would not work.

Regards
Hopki :)
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
Hopki
Gnome
Posts: 13022
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Ok just tested, all works ok. Used an area hot spot to activate Surround and Directional sound.

Used mouse click and mouse enter and leave to start and stop it.
Jobs a gooden
Hopki :)
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
Hopki
Gnome
Posts: 13022
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi
Here is my test, Here, the directional sound comes from the North.
To start the sound, click on the street signpost to the left of the road.
The street signpost on the right of the road pauses it.

The street signs have area hotspots over them, linked by hotspot proxy to the invisible rectangles. The audio is a 9MB mp3 which is not in the skin but on the server.
Regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

Well I have tried the following and it does not work-

1. Created hotspot in hotspot editor (default Hotspot ID is 1)
2. Added directional sound via sound editor panel. The created sound default ID is "_panosound_0", set volume to "0"
3. Went to skin editor, added your rectangle with alpha=0, border=0

4. Assigned proxyhotspot_id=1 to the rectangle and added an action for the above rectangle in the skin editor-
----- Mouse Click -> Set Volume=1 -> target=_panosound_0 (also tried just "0")
----- Mouse Click -> Play Sound -> target=_panosound_0 (also tried just "0")

5. Built the project into a .swf file.

The sound does not play and the cursor is wrong when going over the hotspot (should be a "hand" not the letter "i").

Additionally, I did not realize right away that one could type in a value for the "target" in the target selection box as an alternative to picking an option from the drop down list. To my knowledge, this is not, and has never been, the way multi-value select boxes are supposed to function. Very unintuitive indeed as are other aspects of this software I am realizing. I assume this can be attributed to the ongoing development of this beta version?

Well- being fairly new to this software, I do not understand why hotspots that are assigned to a specific points/areas within the panoramic image need to be linked through the skin editor in such a manner in order to implement actions such as this. To me, the skin editor should contain consistent elements of the stage and not of the panoramic image itself unless action is required crossing between them (like points on a map that is always visible or navigation buttons etc). It seems it would be far more efficient and intuitive for actions to be assigned to panorama hotspots from within the hotspot editor and not try to fold the two together with all of these "alpha=0" dummy hotspots cluttering up the stage in the skin editor.

If I have a large number of hotspots in a panorama- loading up the stage with 50 or so empty "rectangles" for the sole purpose of assigning actions to them really seems like a very inefficient way of doing this. If this was a full tour with 20 panos, each with 20 hotspots all requiring actions for example- then you would have quite a mess on your hands I think. And many extra skins perhaps even.

A proper method should be like this no? :

1. Add directional sound in sound editor.
2. Create hotspot in hotspot editor
3. Assign action to hotspot (in hotspot editor): Select the Hotspot -> On Click -> Play Sound ->(select sound from list box).
4. Done... Build project.

Seems like it would be much better to me.
User avatar
Hopki
Gnome
Posts: 13022
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

I am turning in now, but I will go though it tomorrow, I made some
changes to what I posted earlier so sorry about that.
The software is in beta, with sound being quite new.
Regards Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

I took a look at the link you added to your earlier post. I am glad to see that there is a way to get it working and to have the correct cursor. Looking forward to seeing what changes you made in order to get it working. You had mentioned that the sound file you used was external- would that make a difference from one that is embedded as I have?
User avatar
Hopki
Gnome
Posts: 13022
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi mbb,

Sounds:
The only reason I had the sounds external is because it is 9.95MB and I did not want to add this to the swf file, it would have taken to long to download. :(
I have this sound file on my server already so more than one pano can use it. :wink:

Mouse curser:
Under advanced settings you will see the Mouse Cursor options, as a preference I prefer not to have any of the boxes ticked, just more to load and on some machines the cursor can behave very odd, perhaps down to graphics cards etc. So I choose not to use it.

How to get this working, work flow:
---------------------------------------------

Sound Editor:
Click Modify,
I added a Directional Circular hotspot, however it could have been any of the other sound options. I then added my sound files, using the open button. I set the ID: to test sound and then set the Loop: to -1. This stops the sound from playing straight away, I then ticked the External, Don’t embed, tick box. Click OK to exit.

Hotspot Editor, Area:
Click Modify,
Tick Enable, find the area you want to make active, then add the hotspot. I added a Title of Start sound in one and Stop sound in another, it should have been Pause sound, but hay :lol:

I ended up with:
1 – Start Sound
2 – Stop Sound
Dont forget the 1 and 2 at the start are the hotspot proxys.
Click OK and then click Create All or the abobe will not be saved to the pano.

Skin:
Open the skin editor
Make two rectangles, the one to start the sound, give it the actions of:
MouseClick, Play Sound, Target: test sound. (The same id of the sound file)
Adjust the settings of the rectangle so it can not be seen, the easy way to do this is just to un-tick Visible. Now set the Hotspot Proxy to 1.

The rectangle to pause the sound is the same as above, but with the action MouseClick, Pause Sound, Target: test sound. You will havet o set the Hotspot Proxy to 2.

The reason for the rectangles is because unlike the Point Hotspots there is not a Hotspot Template in the skin editor to link to the area hotspots, so I use a rectangle.

Saying that the above can also be done with point hotspots, just putting the actions in the hotspot graphic.

So as you can see, very quick and easy, as for lots of little rectangles in the skin, you can hide them in the editor very easily by clicking the paint brush graphic next to the element.

It would be nice to see the sounds in the drop down box next to the actions, but in the scheme of things, not really a problem.

I don’t know how much interaction there can be between the skin and the panorama, and if it is even possible for the skin to show IDs of sounds in the panorama as the IDs are not in the skin.

Perhaps something for Thomas in a future version, all in all this is a cracking peace of software and the only reason I spend so much time with it.

It caters for all people, photographers that just want to take pictures and want a simple point and click system, but then also have enough for those that like to push the limits.

Kind regards
Hopki :)
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

Thank you for exploring this and posting your information. I have gotten it to work as a result.
User avatar
k.ary.n
Gnome
Posts: 615
Joined: Wed Aug 15, 2007 1:02 pm

Thanks Hopki!!
Post Reply