loadscene(get(scene[0].name), null, MERGE);
buildthumbs();
inc(frame,1,get(frames),0);
mul(ypos,frame,frameheight);
txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
delayedcall(0.03, hotspot_animate() );
tween(hotspot[%1].alpha, 0.0, 0.25, default);
tween(hotspot[%1].rotate, %4, 0.25, default);
tween(hotspot[%1].ath, %2, 0.25, default);
tween(hotspot[%1].atv, %3, 0.25, default, WAIT);
looktohotspot(%1);
set(plugin[loading].visible,true);
loadscene(%5, null, MERGE, BLEND(2));
copy(startview_hlookat, view.hlookat);
copy(startview_vlookat, view.vlookat);
copy(startview_fov, view.fov);
lookat(%6, %7, %8);
wait(LOAD);
set(plugin[loading].visible,false);
wait(BLEND);
fade_in_hotspots();
oninterrupt(break);
lookto(get(startview_hlookat), get(startview_vlookat), get(startview_fov), smooth(60,-60,180));
tween(hotspot[%1].alpha, %2);
if(%1 != NEXT, set(i,0));
if(i LT hotspot.count,
fade_hotspots(get(hotspot[get(i)].name), 1.0);
inc(i);
fade_in_hotspots(NEXT);
);
div(screen_sideaspect, stagewidth, stageheight);
div(hotspot_sideaspect, hotspot[%1].width, hotspot[%1].height);
if(screen_sideaspect LT hotspot_sideaspect,
div(hotspot[%1].width,stagewidth,stageheight);
mul(hotspot[%1].width,80);
txtadd(hotspot[%1].width,'%');
set(hotspot[%1].height,prop);
,
set(hotspot[%1].width,prop);
set(hotspot[%1].height,80%);
);
showtext([b][i]Sala Estar / Jantar[/i][/b], infostyle);
action(activatespot,scene_pano1, 28);
wait(4);
lookto(108,12,120,smooth(70,40,120));
wait(12);
lookto(210,12,120,smooth(70,40,120));
autorotate(true);
showtext([b][i]Varanda / Churrasqueira[/i][/b], infostyle);
action(activatespot,scene_pano2, 10);
showtext([b][i]Escritorio[/i][/b], infostyle);
action(activatespot,scene_pano3,50);
showtext([b][i]Vista Panoramica[/i][/b], infostyle);
showtext([b][i]Dormitorio[/i][/b], infostyle);
action(activatespot,scene_pano4,264);
showtext([b][i]Suite[/i][/b], infostyle);
action(activatespot,scene_pano5,350);
showtext([b][i]Banheiro[/i][/b], infostyle);
action(activatespot,scene_pano6,210);
showtext([b][i]Corredor Circulação[/i][/b], infostyle);
action(activatespot,scene_pano0, 2.0);
showtext([b][i]Cozinha / Area de Serviço[/i][/b], infostyle);
action(activatespot,scene_pano7, 170);
set(plugin[radar].mask, mapmask);
set(onclick,action(openmap););
tween(width,80,distance(341,0.5),easeoutquad);
tween(height,80,distance(336,0.5),easeoutquad);
set(onclick,action(closemap););
tween(width,341,distance(341,0.5),easeoutquad);
tween(height,336,distance(336,0.5),easeoutquad);
set(onclick,action(openmap););
tween(width,80,distance(341,0.5),easeoutquad);
tween(height,80,distance(336,0.5),easeoutquad);
set(onclick,action(closemap););
tween(width,341,distance(341,0.5),easeoutquad);
tween(height,336,distance(336,0.5),easeoutquad);
set(plugin[activespot].parent, plugin[%1]);
set(plugin[activespot].visible, true);
copy(plugin[radar].x, plugin[%1].x);
copy(plugin[radar].y, plugin[%1].y);
set(plugin[radar].visible, true);
set(plugin[radar].heading, %2);
if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );
if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
set(hotspot[%1].enabled,true);
set(hotspot[%1].visible,true);
tween(hotspot[%1].alpha, 1.0);
tween(hotspot[%1].flying, 1.0);
tween(hotspot[%1].scale, 1.2);
tween(hotspot[%1].rx, 0.0);
tween(hotspot[%1].ry, 0.0);
tween(hotspot[%1].rz, 0.0);
set(hotspot[%1].enabled,false);
tween(hotspot[%1].alpha, 0.0, 0.5, default, set(hotspot[%1].visible,false); );
tween(hotspot[%1].flying, 0.0);
tween(hotspot[%1].scale, get(hotspot[%1].oldscale));
tween(hotspot[%1].rx, get(hotspot[%1].oldrx));
tween(hotspot[%1].ry, get(hotspot[%1].oldry));
tween(hotspot[%1].rz, get(hotspot[%1].oldrz));
if(hotspot[get(pic)] === null,
txtadd(picfilename,'%CURRENTXML%/graphics/pic_',get(pic),'.jpg');
addhotspot(get(pic));
getcenter(hsath,hsatv);
copy(hotspot[get(pic)].ath, hsath);
copy(hotspot[get(pic)].atv, hsatv);
set(hotspot[get(pic)].visible,false);
set(hotspot[get(pic)].distorted,true);
set(hotspot[get(pic)].zorder,2);
set(hotspot[get(pic)].scale,0.0);
set(hotspot[get(pic)].alpha,0.0);
set(hotspot[get(pic)].onloaded, flyin(get(name)) );
set(hotspot[get(pic)].onclick, flyout(get(name)) );
copy(hotspot[get(pic)].url,picfilename);
,
flyin(get(pic));
);
if(%1 != NEXT, set(i,0));
if(i LT scene.count,
copy(thumb, scene[get(i)].thumburl);
txtadd(thumbname,'thumb_',get(i));
addplugin(get(thumbname));
set(plugin[get(thumbname)].url, get(thumb));
set(plugin[get(thumbname)].keep, true);
set(plugin[get(thumbname)].align, leftbottom);
set(plugin[get(thumbname)].width, 40);
set(plugin[get(thumbname)].height, 40);
set(plugin[get(thumbname)].x, 10);
set(plugin[get(thumbname)].y, 10);
mul(plugin[get(thumbname)].x, i,3);
mul(plugin[get(thumbname)].y, i,3);
add(plugin[get(thumbname)].x, 5);
add(plugin[get(thumbname)].y, 5);
copy(plugin[get(thumbname)].xsmall, plugin[get(thumbname)].x);
copy(plugin[get(thumbname)].ysmall, plugin[get(thumbname)].y);
add(plugin[get(thumbname)].zorder, 100, i);
set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000));
set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF');
copy(plugin[get(thumbname)].thumbpos, i);
set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) );
set(plugin[get(thumbname)].onclick, openthumbs() );
inc(i);
buildthumbs(NEXT);
);
if(%2 != NEXT,
set(pos,0);
copy(curpos, plugin[%1].thumbpos);
set(xdst, 0);
set(ydst, 0);
);
if(pos LT curpos,
inc(pos);
inc(ydst,90);
sub(ymax, stageheight, 100);
if(ydst GT ymax, inc(xdst,90);set(ydst,0); );
openthumb(%1,NEXT);
,
add(xdst,10);
add(ydst,10);
tween(plugin[%1].x, get(xdst) );
tween(plugin[%1].y, get(ydst) );
tween(plugin[%1].width, 80);
tween(plugin[%1].height, 80);
);
tween(plugin[%1].x, get(plugin[%1].xsmall));
tween(plugin[%1].y, get(plugin[%1].ysmall));
tween(plugin[%1].width, 40);
tween(plugin[%1].height, 40);
if(%1 != NEXT,
set(i,0);
set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );
);
if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
openthumb(get(thumbname));
set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
inc(i);
openthumbs(NEXT);
);
if(%1 != NEXT, set(i,0));
if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
closethumb(get(thumbname));
set(plugin[get(thumbname)].onclick, openthumbs() );
inc(i);
closethumbs(NEXT);
);