• I have put this gif in my tour but I can't get it to rotate, what am I doing wrong?

    I am using this code:

    Code
    <hotspot name="test_gifer" url="images/test.gif" keep="true"    scale="1"  distorted="true"/>


    If there is no simple way of "animating" the gif I was wondering if there is a way to controll how fast the hotspot animation updates the frames as seen in this example:

    Code
    <style name="hotspot_ani_black" enabled="false"	       url="images/hotspot_ani_black_64x64x20.png" alpha="0"	       crop="0|0|64|64" zorder="2" keep="true"	       framewidth="64" frameheight="64" frame="0" lastframe="19"	       onloaded="hotspot_animate();"	       />


    I have made a version with the gif as the hotspot png but it rotates too fast.

    Help is appreciated *thumbsup*

  • Hi,

    Animated-gifs are not supported in Flash.
    In HTML5 they would work but are not recommended - in many browsers they perform worse compared to xml-animated png hotspots.

    Regarding speed control of xml animated hotspot - look into the 'hotspot_animate' action - it contains a 'delayedcall' with a time value (e.g. 0.03) - this is the time in seconds between the frames.

    Best regards,
    Klaus

  • Hi! Are you sure you changed what Klaus meant?

    Here's the action:

    Code
    <action name="hotspot_animate">
    		inc(frame,1,get(lastframe),0);
    		mul(ypos,frame,frameheight);
    		txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
    		delayedcall(0.03, if(loaded, hotspot_animate() ) );
    	</action>

    if you change this line:

    Code
    delayedcall(0.03, if(loaded, hotspot_animate() ) );


    to

    Code
    delayedcall(0.2, if(loaded, hotspot_animate() ) );

    You will see that animation works slower.

Jetzt mitmachen!

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