if then syntax in xml

  • I am building a virtual tour for a client where the flash version will have 20+ tours and the ipad iphone version much less, so I want to redefine the scenetoload varible. Here is my if/then statement in the xml file:


    <action name="startup">

    if(scenetoload === null, set(scenetoload,pano14));

    if(scenetoload === "norrington", set(scenetoload,pano5));

    if(scenetoload === "ground-floor", set(scenetoload,pano14));

    if(scenetoload === "first-floor", set(scenetoload,pano18));

    if(scenetoload === "second-floor", set(scenetoload,pano19));

    if(scenetoload === "outside", set(scenetoload,pano22));


    loadscene(get(scenetoload),blend(4));


    </action>


    When I run it and set for example scenetoload to be second-floor, it is not being changed to pano19 (as above), however if(scenetoload === null, set(scenetoload,pano14)); works ok, so assume i'm doing something wrong with syntax.


    Any ideas much appreciated.


    Tim

Participate now!

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