Hotspots with automatic target scene title

  • Just wanted to post a little code fragment I programmed to display a text under the hotspots, which shows the name of the target scene dynamically. So, if you change the name of the scene, all hotspots in the other scenes "know" the name. You don't have to change in each scene. *smile*

    You just have to add the style once and for each hotspot a second textfield hotspot, with the correct reference to the hotspot.

    Code
    <style name="textfeld"  oy="60"  url="%SWFPATH%/plugins_17/textfield.swf" selectable="false"  background="false" handcursor="false" textshadow="3" css="text-align:center; color:#FFFFFF; font-family:arial; font-size:16px; font-style:italic; font-weight:bold;"/>
    Code
    <hotspot name="spot" style="skin_hotspotstyle" ath="0" atv="0" linkedscene="scene" />
       
     	<hotspot style ="textfield" 
    onloaded="set(ath,get(hotspot[spot].ath));set(atv,get(hotspot[spot].atv));set(html,get(scene[get(hotspot[spot].linkedscene)].title));"/>

    Thought it could be useful for others...

    Does anybody see a possibility to add this text dynamically to every new hotspot without adding the lines for each hotspot? vtourskin.xml?

Participate now!

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