You are not logged in.

  • "tksharpless" started this thread

Posts: 83

Location: Philadelphia, Pennsylvania

Occupation: Retired S/W engineer

  • Send private message

1

Tuesday, December 31st 2013, 6:44pm

Why is my button not showing?

Dumb question; but I'm stuck.
I'm trying to add a simple "home" button to a vtour generated by krpano 1.17. In tour.xml I have put

<layer name="HomeButn" url="skin/HomeButn.png" keep="true"
scale="0.5" align="center" x="0" y="0" visible="true"
onclick="skin_hidetooltips(); loadscene(get(scene[0].name)),null,MERGE,BLEND(1)); skin_updatescroll();"
/>
But nothing is visible at screen center,and there is no error message. The .png is good, I can use it as a hotspot.
Am I overlooking something needed to show the button? I can't identify anything like that by looking at vtour_skin.xml.

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Tuesday, December 31st 2013, 8:16pm

Hi! I've made a quick test and it seems that in 1.17pre it's impossible to have the same "name" attribute and file name in the "url".

E.g. if layer is called "HomeButn" so the url can't be "HomeButn.png". Just rename "HomeButn.png" to something else.

I tested your case in 1.19 and it works fine, so the problem relates to 1.17pre only.
Regards,

Alexey

3

Thursday, January 2nd 2014, 10:21am

Hi,

can you show the full example?
Based on the available information here it is not possible to say why it will not shown.

I've made a quick test and it seems that in 1.17pre it's impossible to have the same "name" attribute and file name in the "url".
Sorry, but that's impossible - there is absolutely no relation between the element name and the content in the url path!

Best regards,
Klaus

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Thursday, January 2nd 2014, 11:02am

I returned to the test and now all works fine *confused* . Maybe it was some cache issue.... hmmm
Regards,

Alexey

  • "tksharpless" started this thread

Posts: 83

Location: Philadelphia, Pennsylvania

Occupation: Retired S/W engineer

  • Send private message

5

Thursday, January 2nd 2014, 7:00pm

Well maybe it is not possible, however I just changed the layer name and the button became visible. Perhaps it is a subtle cache issue, but it looks like a bug to me *rolleyes*

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

6

Friday, January 3rd 2014, 10:04am

Weeell...and if you change the name back to its original name? Will the layer disappear?
Regards,

Alexey

7

Friday, January 3rd 2014, 7:39pm

Again - there is really no relation between the element name and the url path!

  • "tksharpless" started this thread

Posts: 83

Location: Philadelphia, Pennsylvania

Occupation: Retired S/W engineer

  • Send private message

8

Saturday, January 4th 2014, 3:56am

Good thinking, Alexey. And the answer is, no, changing the layer name back did not make the button disappear. So you are correct, Klaus, it must have been a browser problem (but one not fixable by clearing cache, because I tried that).

BTW you can see the final tour [here]. The house-looking thing at upper left is my home button.

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

9

Saturday, January 4th 2014, 10:15am

What disturbs me most here is that I remember clearly that when I made a test the button won't appear when its name was "HomeButn" and its url was "HomeButn.png". That's why I answered to you, Tksharpless))) Then it went Okay. There's no cache because I used standalone Flashplayer.... *blink* *confused* *confused*

Okay, I suppose it was just 31st December and some kind of a New Year mystery out here ;-) *tongue*
Regards,

Alexey

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

10

Saturday, January 4th 2014, 10:40am

haha)) I've kept playing a bit trying to reproduce this mysterious thing and made the dumbest little test of all the time:

Source code

1
2
3
4
<layer name="HomeButn.png" url="skin/HomeButn.png" keep="true"
	scale="0.5" align="center" x="0" y="0" visible="true"
	onclick="skin_hidetooltips(); loadscene(get(scene[0].name)),null,MERGE,BLEND(1)); skin_updatescroll();"
	/>


I know, I know, nobody will name a layer like this, but it DISAPPEARS! *tongue* So the name is somehow in touch with the url? *confused* or.....
Regards,

Alexey

11

Sunday, January 5th 2014, 10:45am

Hi,

the problem is the dot '.' in the name.
Any name with a dot inside will fail, the url value doesn't matter.

A dot is used in the krpano syntax as 'separation' between the name of the object and the name of an attribute of it.

E.g. take the variable name 'plugin.count':
  • 'plugin' is the name of the object (of the plugin array in this case)
  • 'count' is the name of an attribute/member of that object (the number of elements in this array)

That means in your case with 'HomeButn.png':
  • The viewer will first look for an object named 'HomeButn' and than for an attribute 'png'
  • both objects will be not found and therefore this fails

I will check if that behavior can be avoided inside the viewer and it not to add at least an error for this case and extend also the documentation that dots are not allowed to be used in names.

Best regards,
Klaus