use of placeholders in slider-blend-cubes

  • I would like to use a placeholder for hotspots direction1...direction48 in order not to repeat setblend action in each scene (also all hotspot have to be declared at the begining of the xml for practical reasons)
    how do I manage these placeholders. I looked at tutorials, but I don't understand all...)

    declaring hotspots :

    Code
    <hotspot name="direction1" style="hotspot_anim" zorder="5" visible="true" enabled="true" ath="-232" atv="-32" keep="true"  onclick="loadscene(scene1, null, MERGE, BLEND(1)); "  />
    <hotspot name="direction2" style="hotspot_anim" zorder="5" visible="true" enabled="true" ath="-102" atv="22" keep="true"  onclick="loadscene(scene2, null, MERGE, BLEND(1)); "  />
    ...<hotspot name="direction48"...


    hide hotspots at start :

    Code
    <action name="start">
    set(hotspot[direction1].visible,false);
    set(hotspot[direction2].visible,false);
    ...set(hotspot[direction48].visible,false);
    </action>


    making first hotspot visible in scene :

    Code
    <scene name="scene1" onstart="action(startscene);set (hotspot[direction1].visible,true ));">
    	addcube(pano1);
    	addcube(pano2);
    	setblend(0);	
    </scene>


    setblend action in global.xml :

    Can someone help me for this ?

    Thanks

    Philippe

  • Hi,

    when you call an action with parameters, e.g.

    Code
    test(parameter1, parameter2);

    then you can use inside this action %1, %2 where you want the parameters, e.g.

    Code
    <action name="test">
    trace('parameter1=', %1);
    trace('parameter2=', %2);
    </action>

    best regards,
    Klaus

Participate now!

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