• Hi,

    I would like to make hotspot blinking. So I think the tweening of the alpha setting of the hotspot will help.
    Followings are my code. However, the hotspt doesnot blinking, but just disappeared.

    Please check for me.

    Code
    <hotspot name="info1" url="http://360vr.kr/panoramas/NMus/skin/map_node_s.png" ath="0" atv="3" onloaded="wait(3); hotspot_animate(get(name));" />
    
    
    <action name="hotspot_animate">
    	tween(hotspot[%1].alpha, 0.0, 1, default, tween(hotspot[%1].alpha, 1.0, 1));
    	if(loaded, delayedcall(0.01, hotspot_animate(%1); ); ); 
    </action>

    Thanks in advance.

    Min

  • Hi,

    it is disappearing because you restart the tween to 0 every 0.01 seconds (the delayedcall).

    Here a working code with an endless loop - see the donecall in the second tween:

    Code
    <action name="hotspot_animate">
      if(hotspot[%1].loaded,
        tween(hotspot[%1].alpha, 0.0, 1.0, default, tween(hotspot[%1].alpha, 1.0, 1.0, default, hotspot_animate(%1) ) );
      );
    </action>

    First it will tween alpha 0.0, then the second tween will be called where alpha will be tweened to 1.0, and when this is done too - the action itself will be called again and the process starts from the beginning.

    And as 'stop action' there is the 'loaded' check around to avoid running that action endless even if the hotspot is already removed.

    Best regards,
    Klaus

Jetzt mitmachen!

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