Sie sind nicht angemeldet.

21

Mittwoch, 9. März 2011, 14:51

jordi - first thing i wanted to say was great photography and i love the transition from pano to pano. that is something krpano is way behind on from FPP. Also your top bar inside the pano does not strech all the way to the edge on my 22" monitor. auditorium and shop are floating in the air.

i tend to use separate xmls for almost everything. it reduces load times. even though the hotspots and plugins inside the individual scene tags are not setup until that scene is loaded it all still has to be parsed from the start before anything happens.

22

Mittwoch, 18. Mai 2011, 02:16

hi.
I'm using demo version still, but...
I define some action

Quellcode

1
2
3
<action name="testa">
showtext(%1);
</action>


Then trying to call it:

Quellcode

1
<hotspot name="somespot" url="img/dymek.png" ath="-10.94" atv="3.62" scale="1" zoom="false" onclick="testa(supertest);" onhover="" />

and it's not working but:

Quellcode

1
<hotspot name="somespot" url="img/dymek.png" ath="-10.94"  atv="3.62" scale="1" zoom="false" onclick="action(testa,supertest);" onhover=""  />

works just fine.

What did i wrong?

23

Donnerstag, 19. Mai 2011, 02:03

Hi Kamilus,

Nothing wrong... the two ways to call an action are correct since krpano 1.0.8 beta 8

user defined actions <action> can now be called "direct"
e.g. instead of:

Quellcode

1
action(actionname, parameters...);

now also just:

Quellcode

1
actionname(parameters...);
is possible
Perhaps, it should be better to use onhover instead of onclick to call the showtext()

Quellcode

1
<hotspot name="somespot" url="img/dymek.png" ath="-10.94" atv="3.62" scale="1" zoom="false" onclick="" onhover="testa(supertest);" />


SAlut.

24

Donnerstag, 5. Juli 2012, 01:36

Thank so much @pinsane, very helpful!

Tiny little note (and I'm not trying to be a smart-a**, and this may not have been possible at the time of writing), but for square-rooting, you can simply use the pow() function:


Quellcode

1
2
pow(temp,2,.5);
trace(get(temp));

25

Freitag, 15. April 2016, 10:30

how can we use multiple plugin using functions??

how to use multiple plugin,events,actions using functions??
Can we use plugin and actions using functions???

26

Dienstag, 12. Oktober 2021, 05:41

Call data from html

Hi everyone, I have this 1 problem:
I pass data from database to file index.html


var lobby = {!! json_encode($lobby) !!}
var virtual = {!! json_encode($virtual) !!}
console.log(lobby.videos[0]);
embedpano({
swf: "/" + lobby.sample.file + "/tour.swf",
xml: "/" + lobby.sample.file + "/tour.xml",
target: "pano",
html5: "auto",
initvars: {
virtual: virtual.title,
mypath: "assets/images/standee/1.png",
setting: virtual.setting_expo,
videolink: window.location + "/video",
videolobby: lobby.videos[0],
lobby: lobby


},
mobilescale: 1.0,
passQueryParameters: true
});


in tour.xml file, i have 1 video hotspot passed videolobby value


<hotspot name="hs_video_5"
url="/%$setting.standee%"
pausedonstart="false"
loop="true"
distorted="true" ath="-0.221" atv="-14.443" rx="-13.1" ry="2.0" rz="0.0" scale="0.203" alpha="1.0"
onload="hs_video[hs_video].play();"
onclick="looktohotspot(get(name),90); youtubeplayer_open(videolobby.video_link);
sound_off(hs_video);"
onhover="action(showHotSpot_text, Watch video) "
/>
in the function youtubeplayer_open
I trace(%1) the correct data
but when i insert in 1 iframe it takes the variable name and not the value i pass in:


txtadd(iframecode, '[iframe width="',get(layer[youtubeplayer_plugin].width),'" height="',get(layer[youtubeplayer_plugin].height),'" src="https://www.youtube.com/embed/',%1,'?',get(youtubeplayer_settings.parameters),'" frameborder="0" allowfullscreen][/iframe]');


Show me how to transmit data
»ngant1096« hat folgendes Bild angehängt:
  • error.JPG