BIOS - Business incubator

  • Hello

    I really liked you panoramas, I can see you're experienced in krpano tools.

    Could you tell me how did I do the multilanguage animated hotspot in room A1?

    Could be a cool feature to learn

    Thanks
    Jacob

  • Here it is. First solution was to have two different png for animation. One for each language with changing of URL depending what language was active. It worked fine until I realised that when language chagned several times in that room, the animation got silly speed up. Due to the fact that animate action was called on URL change it makes mess in the calculations. There I also asked for Klaus for help.

    Than I went in direction creating one and only png for both languages and changing the crop area dynamically. Now it works fine also on IOS and Flash.
    Png looks like:

    (this is just part of it)

    Than code was adapted to change crop area depending on active language.
    Language switch was explained here: link

    Code that follows is adaptation of Klaus animated png examples:

    Code
    <hotspot name="promo_1" url="%FIRSTXML%/animacije/najam_a1.png" visible="true" framewidth="215" frameheight="70" frame="1" lastframe="40" 	ath="259" atv="8" onclick="openurl(http://inkubator.hr/hr_HR/najam-konferencijske-dvorane,_blank)" onloaded="hotspot_najam_animate();"></hotspot>
    
    
    <action name="hotspot_najam_animate">	inc(frame,1,get(lastframe),0);		mul(ypos,frame,frameheight);				txtadd(crop,get(tocka[promo_1].podaci[get(lang)].xpos),'|',get(ypos),'|',get(framewidth),'|',get(frameheight));		delayedcall(0.05, if(loaded, hotspot_najam_animate()));</action>
    
    
    <tocka name="promo_1">	<podaci name="HR" xpos="0"/>	<podaci name="EN" xpos="215"/>	</tocka>

    Hope you got it.

Jetzt mitmachen!

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