Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Sonntag, 8. März 2009, 03:01

turning individual hotspots on and off

is there a way to turn on hotspot A and B but not C and D ??? I have multiple hotspots in my demo spin and would like to turn on and off the directional audio hotspot independently of the standard ones. right now I have to use

switch(hotspot.visible);

to turn them all on and off at the same time. I could not get individual ones to turn on by themselves.

(could this be accomplished if I turned them hotspots into plugins and use the new ox and oy offsets? as I know i can turn individual plugins on and off)

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

2

Sonntag, 8. März 2009, 03:39

did you try switch(hotspot[name].visible)?

I did a quick test... looks to work.

So hopefully the things like set(hotspot[name].attribute, etc...) should work as well.

3

Sonntag, 8. März 2009, 15:54

<action name="directionalaudio">
switch(hotspot[plane].visible);
switch(hotspot[copter].visible);
</action>


this does not work for me. in fact if I use this code and then try to use the

switch(hotspot.visible);

I have been using to turn all hotspots on, the 2 I declared in the above action will not show, but the rest still do. so it is like the action does something to break them from working at all. any ideas?

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

4

Sonntag, 8. März 2009, 18:23

very odd... I did this same thing...

Quellcode

1
2
3
4
<action name="directionalaudio">
switch(hotspot[b1].visible);
switch(hotspot[b2].visible);
</action>


... and it worked fine... using either the swf hotspot or a png hotspot. *confused*

If the action name was spelled differently between the defining portion and where you called for it, you would get an error. Only other thought I have right now would be to make sure the action name isn't used twice or defined in two different areas.

I was able to recreate the same behavior when using one action to change just two hotspots visibility and another set to change them all... but with some interesting results.

action 1 - switch b1 and b2
action 2 - switch all

action 1 worked fine on it's own
action 2 worked fine on it's own

However, if I first clicked action 1 (hide b1 b2) and then clicked action 2 over and over (hide all / show all / hide all / show all)... b1 and b2 stayed gone, the other hotspots toggled visible back and forth...

BUT once I clicked action 1... which brought back b1 and b2... and then toggled action 2... ALL hotspots switched back and forth.

I don't know if that would be considered a bug... or just a limiting factor when dealing with hotspots and the switch action.

Will have to wait for Klaus' input on this item.

5

Sonntag, 8. März 2009, 19:32

Hi,

changing "hotspot.visible" will toggle the visibility of the internal layer that contains all hotspots,
the individual hotspot visible will be not changed!

e.g.
when "hotspot.visible" is "false" - all hotspots are hidden, independed of their visible state
when "hotspot.visible" is "true" - the hotspot visibility depends on its visible state

this works the same for plugin and lensflare,

I hope I cloud clarify that
Klaus

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

6

Montag, 9. März 2009, 06:14

VN - were you able to get this resolved?

my latest thought was to look at the sequence in which the different actions are called... if you have turned all of the hotspots off and then are trying to turn copter and plane back on... then the action will appear to not work based upon Klaus' information.

You would have to set all of your hotspots visibility as false and then turn on just plane and copter when needed.

When I look at your demo / sample that you posted in the other area... I got the impression that you did something like that... because all of the hotspots appear momentarily at the beginning... and then disappear.

Good luck

7

Montag, 9. März 2009, 23:45

I got that partially fixed. Based on what Klaus stated I decided to leave the main universal hotspot switch alone and set the copter and the plane to visible= false at start. I then made an action that makes just the copter and the plane visible which works, and I am now able to turn on just the directional audio hotspots independant of the normal hotspots.

the issue I run into now is that I cannot do the same thing with the normal hotspots. I cannot make them go visible with the same code that works on the plane and copter. my only guess is that for some reason hotspots that do not have an image attached to them like a .png or .swf are not capable of that.

any hotspot that i have linked to a .png or .swf I can turn on and off, the ones without do not turn on/go visible. any ideas on that or has someone else came to the same conclusion?

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

8

Dienstag, 10. März 2009, 01:03

Hmm... I don't know. I was able to replicate the exact issue you have...

I created a poly hotspot... visible
used an action to switch the hotspot visibility to false
click again to switch back... and it doesn't come back.

Also - make note that if you are going to be adding sound to the poly spots... the 3DHS function doesn't work... probably because of challenges figuring out where the sound point should originate from. You'll have to use the other options and set the ath atv points for sound origination.

Based upon previous information... I'd say that this might be a bug with the poly hotspots being switched off/on.

Graydon

9

Dienstag, 10. März 2009, 01:54

I am glad that someone else recieved the same diagnosis. That means I am not crazy. I knew zero XML when I was first introduced to krpano eveything i have learned has taken place in the last 6 months. because of that i always question my output as I am by no means an expierinced coder, but I am learning fast!

when Klaus reads this he will be able to let us know if this is a bug or just not possible. for now I am just going to leave my poly-hotspots on all the time.

Thanks for your assistance Graydon.

10

Dienstag, 10. März 2009, 21:45

you are right, it's a bug! sorry!
it's only in the 1.0.8 beta 6!
it will be fixed with the next beta release

rdhoore108

Schüler

Beiträge: 89

Wohnort: Belgium

Beruf: Systems and Network Administrator

  • Nachricht senden

11

Mittwoch, 29. September 2010, 17:33

Hi,
when "hotspot.visible" is "false" - all hotspots are hidden, independed of their visible state
when "hotspot.visible" is "true" - the hotspot visibility depends on its visible state
Klaus


When I do this with hotspots that were created using addhotspot(), changing hotspot.visible has no effect whatsoever. Is that to be expected, or is it a bug?
- Ronny D'Hoore

12

Freitag, 1. Oktober 2010, 11:39

Hi,
When I do this with hotspots that were created using addhotspot(), changing hotspot.visible has no effect whatsoever. Is that to be expected, or is it a bug?
how do you mean that?

the "hotspot.visible" variable controls the visibility of the whole hotspot layer,
the individual hotspot[name].visible settings will be not be affected by it,
but when the layer itself is invisible, then also all elements inside it (the hotspots) are invisible,

best regards,
Klaus

rdhoore108

Schüler

Beiträge: 89

Wohnort: Belgium

Beruf: Systems and Network Administrator

  • Nachricht senden

13

Freitag, 1. Oktober 2010, 11:55

I meant that when I do set(hotspot.visible, false) then all my hotspots remain visible. Therefore I was thinking that perhaps hotspots that are added with addhotspot() are not a member of that hotspot layer you mentioned?
- Ronny D'Hoore

14

Freitag, 1. Oktober 2010, 12:55

there must be something fundamental wrong in this case!
have you modified the internal krpano display objects in as3?

rdhoore108

Schüler

Beiträge: 89

Wohnort: Belgium

Beruf: Systems and Network Administrator

  • Nachricht senden

15

Samstag, 2. Oktober 2010, 10:26

Zitat

I meant that when I do set(hotspot.visible, false) then all my hotspots remain visible

This was solved by Klaus in another post. The reason was that I had assigned "STAGE" as parent of my hotspots. Never do that! STAGE is a very bad parent, at least to hotspots it is. *g*
- Ronny D'Hoore