|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<plugin name="Link1"
url="%SWFPATH%/ikon/link.png"
keep="true"
enabled="true"
align="leftbottom"
scale="0.45"
x="3" y="240"
scale.mobile="0.45" bgalpha="0.20"
visible="true"
onclick="openurl('http://demo1111.com', );" />
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<plugin name="Link1"
url="%SWFPATH%/ikon/link.png"
keep="true"
enabled="true"
align="leftbottom"
scale="0.45"
x="3" y="240"
scale.mobile="0.45" bgalpha="0.20"
visible="true"
onclick="openurl('http://demo2222.com', );" />
|
|
|
Quellcode |
1 2 3 4 |
set(currentscene, get(global.xml.scene) ); If(currentscene.name == scene_1, , ) |
|
|
Quellcode |
1 |
<scene name="scene_1" ... linkedurl="https//demo1111.com"</scene> |
|
|
Quellcode |
1 |
<hotspot ...onclick="set(currentscene, get(global.xml.scene) ); openurl(get(currentscene.linkedurl));" |
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
|
|
Quellcode |
1 2 3 |
<scene name="scene_1" ... demo="http://demo1111.com"</scene> bla bla <scene name="scene_7" ... demo="http://demo2222.com"</scene> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<plugin name="Link1"
url="%SWFPATH%/ikon/link.png"
keep="true"
enabled="true"
align="leftbottom"
scale="0.45"
x="3" y="240"
scale.mobile="0.45" bgalpha="0.20"
visible="true"
onclick="" />
<events name="demo" keep="true" onnewscene="DoDemo();" />
<action name="DoDemo">
calc(plugin[Link1].onclick, 'openurl(' + scene[get(xml.scene)].demo + ',_blank);');
</action>
|
: https://pame.virtualtuur.comBenutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
Zitat
How can I define the variable inside the action?
Zitat
I use the same technique in the info button. One fact sheet is valid for several scenes. The information text is too long, writing it separately for each scene makes it longer.
I want an info button to be valid in the cases where I specify it, and invalid in the others. What do you think is the answer to this simple question? :)
: https://pame.virtualtuur.comHi,
another approach could be:
set in each scene a 'tag' or lets call it 'demo':
![]()
Quellcode
1 2 3 <scene name="scene_1" ... demo="http://demo1111.com"</scene> bla bla <scene name="scene_7" ... demo="http://demo2222.com"</scene>
![]()
Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18<plugin name="Link1" url="%SWFPATH%/ikon/link.png" keep="true" enabled="true" align="leftbottom" scale="0.45" x="3" y="240" scale.mobile="0.45" bgalpha="0.20" visible="true" onclick="" /> <events name="demo" keep="true" onnewscene="DoDemo();" /> <action name="DoDemo"> calc(plugin[Link1].onclick, 'openurl(' + scene[get(xml.scene)].demo + ',_blank);'); </action>
There are more ways of doing this of course.
hope it helps
Tuur
![]()