how to dynamiclly add hotspot to a scene

  • In each scene, I setted direction hotspots, now I want to dynamiclly add hotspot tip under the direction hotspot;
    for example:

    Code
    <scene name="scene_1" title="Entrace" onstart="" thumburl="../panos/1.tiles/thumb.jpg" lat="29.03297222" lng="115.94229722" heading="208.0">
    		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
    		<preview url="../panos/1.tiles/preview.jpg" />
    		<image>			<cube url="../panos/1.tiles/pano_%s.jpg" />			<mobile>				<cube url="../panos/1.tiles/mobile_%s.jpg" />			</mobile>		</image>
    <hotspot name="spot1" style="skin_hotspotstyle" ath="-10" atv="22.536" linkedscene="scene_2" />
    	    <hotspot name="spot3" style="skin_hotspotstyle" ath="20" atv="22.536" linkedscene="scene_3" 	       />
    	</scene>

    use addhotsopt() can and custom hotsopt, but how can I add the custom hotspot to the scene_1, the hotspot doesn't have parent attribute

  • Hotspots are created every time you get inside a scene, that's why they don't have parent attribute..


    so for adding a tooltip hotspot dynamically, you can just say on the style of your direction hotspots

    onover="addhotspot();"

    and then find a way in order to relate the infos


    <hotspot name="spot3" style="skin_hotspotstyle" tooltip="test tooltip">


    then you would say :


    onover="


    addhotspot(hotspotTooltip);

    set(hotspot[tooltip].url, textfield);
    copy(hotspot[tooltip].html, hotspot[get(name)].tooltip);


    "


    onout="tween(hotspot[tooltip].alpha, 0, , , removehotspot(tooltip));"


    The basic attributes (keep, x, y, ...) I did not writte but as basic structure it should work...


    Hope it helps

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!