Play an ACTION only once
-
-
-
Yeah, I'm kinda getting what do you want me to do ,yet it is not entirely clear.
at default startup, create variable:
So should I create an additional action containing that string and call it using "onstart" and then add
if (get(var1) == 1, 'do smth'; set(var1, 0); );
at the end of my opening sequence? Because I tried that and it didn' work :/ Sorry to post stuff like this, It seems really basic, but some more elaboration would really help :)
-
So should I create an additional action containing that string and call it using "onstart" and then add
Yes, in first xml file that is loaded. The default is tour.xml. Startup action is already made by krpano tools wich loads first scene to stage.
Code<krpano version="1.0.8.15" title="Title" onstart="startup();" > <action name="startup"> if(startscene === null, copy(startscene,scene[0].name)); loadscene(get(startscene), null, MERGE); set(var1, 1); </action> </krpano>
at the end of my opening sequence? Because I tried that and it didn' work :/ Sorry to post stuff like this, It seems really basic, but some more elaboration would really help :)
No, not at the end. You must put you code/sequence inside the 'if' statement. Your sequence must replace 'do smth'.
e.g.:
Codeif (get(var1) == 1, tween(view.fov, 39, 2.0); tween(view.vlookat, -7, 5.5, easeOutQuad); tween(view.vlookat, 0, 2.0); tween(view.fov, 56 1.5,); set(var1, 0); );
in this case all tweens will happen only once
-
And here is the real problem. I'm using Panotour Pro for the initial setup of my tour - i connect diferent scenes, place hotspots etc. PTP produces xml files that have a different structure than the ones made with krpano droplets. Every single scene gets it's own xml. Plus there is one xml with stuff used in all scenes like maps, radars, some staic plugins etc. Therefore I can't just insert that "startup" action, krpano viewer just gives me an error
That's how the file looks like
XML
Display More<?xml version="1.0" encoding="UTF-8"?> <!-- for xml compliance --> <krpano version="1.0.8.15" logkey="false" > <action name="mainloadpano"> closepanoobjects(); ifnot(stopSequence === undefined,interruptAnimation();); loadpano(%1,NULL,keepprogress,BLEND(1)); </action> <plugin name="data" keep="true"/> <include url="virtualtour0.xml"/> <autorotate enabled="false"/>
That's the relevant part, the rest is just bunch of actions that control the radar plugin. So how should I handle it?
-
uh...sorry, i don't use PTP ...
-
Sooo... anyone? Any ideas?
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!