• i am working on a project that needs to go from day to night depending on the desired information. i am using the nasa world map to organize an interactive animal map for our local zoo. it is near done. however i have 1 more issue to work out. 2 of the animals are nocturnal animals. when they are clicked i want the world pano to switch to the nighttime version. and switch back to the day time version if one of the other 11 animals are selcted. i can get it to work if i add the code to load the new xml to each action for each animal. however doing it that way caused the pano to reload in between each animal, that causes a flicker in the screen as it reloads. I cannot find a way to make it work the way i want. if coming from daytime animal to another daytime animal i want it to do nothing, same with night. if going from the first nighttime animal to the second do nothing, if going to daytime, load new tiles. my brain isnt working right on this. what variable could i use to create an IF statement to do what i explained? does this make any sense?

    here is the example. the nighttime animals are the python and the sloth. http://www.virtualnorthland.com/panos/world/

  • Hi VN2009,

    Oufff *wacko* ... Your code is about 3500 lines *wink* ....

    I think you could create a variable to check if it is day or night.

    Perhaps this can be a way:
    Into your world1.xml code add the following events code:

    Code
    <events onxmlcomplete="set(IsDay,true);" />


    Into your world.xml code add the following events code:

    Code
    <events onxmlcomplete="set(IsDay,true);" />


    Into your nightearth.xml code add the following events code:

    Code
    <events onxmlcomplete="set(IsDay,false);" />


    Those events code sets a variable named IsDay to true or false. With this variable we can check if the current pano is in day or in night....

    Into your world1.xml code change your world() and worldnight() actions as follow:

    Code
    <action name="world">
       if(IsDay == true , loadpano(world.xml,null,MERGE,BLEND(2)));
    </action>
    	
    <action name="worldnight">
       if(IsDay == false , loadpano(nightearth.xml,null,MERGE,BLEND(2)));
    </action>


    Now, these actions loaded the pano only if the condition is correct.

    Hope this is correct... Try it... *wink*

    SAlut.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!