You are not logged in.

mauma

Beginner

  • "mauma" started this thread

Posts: 24

Location: Lucca - Italy

Occupation: Photographer / Virtual Tour

  • Send private message

1

Tuesday, June 21st 2016, 11:32am

Get Current Group

Hello everyone, I need help for a script, I tried but I can not find references; I should be able to know what group I'm in a tour, to be able to display or not display a button.








if group = name group


then show button 1, hide button 2


else show button 2, hide button 1




thank you
Mau

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Tuesday, June 21st 2016, 11:42am

If you want to check which scene is loaded and do something:
if(xml.scene == 'your_scene_name_1', trace(do something); );

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Tuesday, June 21st 2016, 12:02pm

Hi,
I would give the scenes that belong to the group something like: tag="groupname"

and then:

Source code

1
<events name="group" keep="true" onnewscene="if(scene[get(xml.scene)].tag == groupname, set(layer[button1].visible,true);set(layer[button2].visible,false);, set(layer[button1].visible, false);set(layer[button2].visible, true));  />


or something like that.
Hope it helps!
Tuur *thumbsup*

mauma

Beginner

  • "mauma" started this thread

Posts: 24

Location: Lucca - Italy

Occupation: Photographer / Virtual Tour

  • Send private message

4

Tuesday, June 21st 2016, 12:29pm

Thx i try it


<events name="group" keep="true" onnewscene="if(scene[get(xml.scene)].tag == panogroup29 ,

set(layer[controlBar_dockedThumbnailsbtn_hide_floorplan].visible, true);
set(layer[controlBar_dockedThumbnailsbtn_display_floorplan].visible, false);
,
set(layer[controlBar_dockedThumbnailsbtn_display_floorplan].visible, true);
set(layer[controlBar_dockedThumbnailsbtn_hide_floorplan].visible, false);
); "

/>

but don't work :(

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

5

Tuesday, June 21st 2016, 1:09pm

Hi,

did you also set in the scenes that needed to be part of the group like:

Source code

1
<scene name="..."  tag="panogroup29" onstart="">


*question*

maybe show a link?

Tuur *thumbsup*

mauma

Beginner

  • "mauma" started this thread

Posts: 24

Location: Lucca - Italy

Occupation: Photographer / Virtual Tour

  • Send private message

6

Tuesday, June 21st 2016, 4:01pm

Hi,

did you also set in the scenes that needed to be part of the group like:

Source code

1

				


*question*

maybe show a link?

Tuur *thumbsup*
Hello, the project is www.kimagesudio.com/ilaria i have group night and day group, i have a button in the toolbar ( sun / moon ) this button change group from night to day, but i need when the group is not night, change the status of button.