﻿<krpano>
	<plugin name="activespot" url="%SWFPATH%/skin/mappointactive.png" keep="true" align="center" edge="center" visible="false" zorder="3" parent="stage"/>

	<action name="initmapsize">
		div(hratio,get(stageheight), get(plugin[gfplan].height));
		div(wratio,get(stagewidth), get(plugin[gfplan].width));
		if(hratio LT wratio
			, set(planratio, get(hratio));
			, set(planratio, get(wratio));
		);
		set(plugin[gfplan].scale, get(planratio));
		mul(finalwidth, plugin[gfplan].imagewidth, plugin[gfplan].scale );
		mul(finalheight, plugin[gfplan].imageheight, plugin[gfplan].scale );
		set(layer[skin_plan_plans_container].width, get(finalwidth)); 
		set(layer[skin_plan_plans_container].height, get(finalheight));
	</action>

	<action name="activatespot">
		if(plugin[activespot].parent!=null
			, set(plugin[get(plugin[activespot].parent)].crop, '');
		);
		if(device.flash, set(plugin[activespot].url, get(plugin[%1].flashactiveurl)););
		if(device.html5, set(plugin[activespot].url, get(plugin[%1].html5activeurl)););
		set(plugin[activespot].parent, %1);
		set(plugin[activespot].alpha, 0);
		set(plugin[activespot].scale, 8);
		tween(plugin[activespot].alpha, 1);
		tween(plugin[activespot].scale, 1);

		set(plugin[%1].crop,'0|0|0|0');

		set(plugin[activespot].visible, true);

		if(currpanomappoint!=%1, set(currpanomappoint, %1););
	</action>
</krpano>