showtooltip('hotspot');
tween(scale, 1.2);
tween(alpha, 1);
hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
showtooltip('hotspot');
tween(scale, 1.2);
tween(alpha, 1);
hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
showtooltip('hotspot');
tween(scale, 1.2);
tween(alpha, 1);
hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
showtooltip('hotspot');
tween(scale, 1.2);
tween(alpha, 1);
hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);
set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);
if(%1,
if(%2,
if(%2 LT view.fovmin,
zoomto(get(view.fovmin));
,
if(%2 LT view.fov,
zoomto(%2);
);
);
,
set(fov_moveforce, -1);
delayedcall(0.1, viewControlZoomStop());
);
,
set(fov_moveforce, -1);
);
if(%1,
if(%2,
if(%2 GT view.fovmax,
zoomto(get(view.fovmax));
,
if(%2 GT view.fov,
zoomto(%2);
);
);
,
set(fov_moveforce, +1);
delayedcall(0.1, viewControlZoomStop());
);
,
set(fov_moveforce, +1);
);
set(fov_moveforce, 0);
set(tour_fullscreen,false);js(setFullscreen(false));
set(tour_fullscreen,true);js(setFullscreen(true));
if(tour_fullscreen,exitFullScreen();,enterFullScreen(););
set(tour_fullscreen,false);events.dispatch(onexitfullscreen);
set(tour_fullscreen,true);events.dispatch(onenterfullscreen);
set(fullscreen,false);
set(fullscreen,true);
delayedcall(0,updatescreen(););
set(tour_displaycontrols, false);events.dispatch(hidetourcontrols);
set(tour_displaycontrols, true); events.dispatch(showtourcontrols);
ifnot(plugin[soundinterface].volumeinitialized,
div(plugin[soundinterface].volume, tour_soundsvolume, 100);
set(plugin[soundinterface].volumeinitialized,true);
);
set(really_play_sound, true);
if (tour_current_played_sound,
if (%1 == tour_current_played_sound,
delete(tour_current_played_sound);
set(tour_current_played_sound_state, 0);
delete(tour_current_played_sound_paused);
stopsound(%1);
set(really_play_sound, false);
if(%4,
delete(tour_current_played_sound_pausesound);
resumeTourSoundsActions(true,true,true,true,true);
);
);
);
if (really_play_sound,
if (tour_current_played_sound,
stopsound(get(tour_current_played_sound));
ifnot(%4,
if(tour_current_played_sound_pausesound,
delete(tour_current_played_sound_pausesound);
resumeTourSoundsActions(true,true,true,true,true);
);
);
);
if(%4,
set(tour_current_played_sound_pausesound, true);
pauseTourSoundsActions(true,false,true,true,true);
);
set(tour_current_played_sound, %1);
if(tour_current_played_video,
set(tour_current_played_sound_state, 2);
,
set(tour_current_played_sound_state, 1);
);
set(tour_current_played_sound_paused, false);
if (%3,
if (device.flash,
div(volume, tour_soundsvolume, 100);
if(%9 != null,
playsound3D(%1,%2,%5,%6,%7,get(volume),%8,stopsound3Dwhenpossible(%1,%4));
,
playsound3D(%1,%2,%5,%6,%7,get(volume),%8);
);
,
if(%9 != null,
playsound(%1,%2,%8,stopsound3Dwhenpossible(%1,%4));
,
playsound(%1,%2,%8);
);
);
,
if(%6 != null,
playsound(%1,%2,%5,stopsound3Dwhenpossible(%1,%4));
,
playsound(%1,%2,%5);
);
);
ifnot(tour_soundson,
set(tour_current_played_sound_paused, true);
pausesound(%1);
);
);
if (%1 == tour_current_played_sound,
delete(tour_current_played_sound);
set(tour_current_played_sound_state, 0);
delete(tour_current_played_sound_paused);
ifnot(device.safari,
stopsound(%1);
);
if(%2,
delete(tour_current_played_sound_pausesound);
resumeTourSoundsActions(true,true,true,true,true);
);
);
if(playsound,
if (xml.scene,
if (scene[get(xml.scene)].backgroundsound,
if (plugin[soundinterface].backgroundsound != scene[get(xml.scene)].backgroundsound,
copy(plugin[soundinterface].backgroundsound, scene[get(xml.scene)].backgroundsound);
copy(plugin[soundinterface].backgroundsoundloops, scene[get(xml.scene)].backgroundsoundloops);
if (tour_soundson,
set(plugin[soundinterface].bgsound, true);
set(plugin[soundinterface].bgsoundpaused, false);
set(plugin[soundinterface].bgsoundloopended, false);
if(plugin[soundinterface].backgroundsoundloops GT 0,
playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
,
playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
);
,
set(plugin[soundinterface].bgsound, false);
);
,
if (tour_soundson,
if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
resumesound(bgsoundname);
set(plugin[soundinterface].bgsoundpaused, false);
);
,
set(plugin[soundinterface].bgsound, false);
);
);
);
);
,
delayedcall(0.2, playbackgroundsound());
);
if (plugin[soundinterface].backgroundsound,
if (plugin[soundinterface].backgroundsoundloops GT 0,
set(plugin[soundinterface].backgroundsoundloops, 0);
set(plugin[soundinterface].bgsound, false);
set(plugin[soundinterface].bgsoundpaused, false);
set(plugin[soundinterface].bgsoundloopended, true);
);
);
if (xml.scene,
if (scene[get(xml.scene)].backgroundsound != scene[%1].backgroundsound,
if(plugin[soundinterface].backgroundsound,
stopsound(bgsoundname);
);
set(plugin[soundinterface].backgroundsound, "");
set(plugin[soundinterface].backgroundsoundloops, 0);
set(plugin[soundinterface].bgsound, false);
set(plugin[soundinterface].bgsoundpaused, false);
set(plugin[soundinterface].bgsoundloopended, false);
);
);
if(plugin[soundinterface].backgroundsound,
if (plugin[soundinterface].bgsound,
if(plugin[soundinterface].bgsoundpaused == false AND plugin[soundinterface].bgsoundloopended == false,
pausesound(bgsoundname);
set(plugin[soundinterface].bgsoundpaused, true);
);
);
);
set(bgSoundOnResume, true);
set(forceBgSoundOnResume, true);
if(layer[displayedStandardVideo],
if(layer[displayedStandardVideo].pausebgsound AND tour_current_played_video,
set(bgSoundOnResume, false);
set(forceBgSoundOnResume, false);
););
if(layer[webvideodisplay_player],
if(layer[webvideodisplay_player].pausebgsound AND tour_current_played_web_video,
set(bgSoundOnResume, false);
set(forceBgSoundOnResume, false);
););
if(tour_current_played_sound_pausesound AND tour_current_played_sound,
set(bgSoundOnResume, false);
);
ifnot(plugin[soundinterface].backgroundsound AND scene[get(xml.scene)].backgroundsound,
set(bgSoundOnResume, false);
);
if(videospots_playing GT 0,
set(bgSoundOnResume, false);
set(forceBgSoundOnResume, false);
);
if(bgSoundOnResume,
if (plugin[soundinterface].backgroundsound,
if (tour_soundson,
if (plugin[soundinterface].bgsound AND plugin[soundinterface].bgsoundloopended == false,
if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
resumesound(bgsoundname);
set(plugin[soundinterface].bgsoundpaused, false);
);
,
set(plugin[soundinterface].bgsound, true);
set(plugin[soundinterface].bgsoundpaused, false);
set(plugin[soundinterface].bgsoundloopended, false);
if(plugin[soundinterface].backgroundsoundloops GT 0,
playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
,
playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
);
);
);
);
,
if(forceBgSoundOnResume,
playbackgroundsound();
);
);
preloadsound("reception.mp3");
preloadsound("sala_pesi_cardio.mp3");
preloadsound("swimming_pool.mp3");
preloadsound("sala_funzionale.mp3");
preloadsound("spogliatoio.mp3");
preloadsound("aereal_vertical.mp3");
preloadsound("arti_marziali.mp3");
preloadsound("sala_olistica.mp3");
preloadsound("sala_the.mp3");
preloadsound("sala_fitness.mp3");
preloadsound("sala_danza.mp3");
preloadsound("zona_benessere.mp3");
if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, playpanolocalsounds();););
if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, stoppanolocalsounds();););
if (xml.scene, if (scene[get(xml.scene)].haslocalsounds,
set(kill3dSoundOnResume, true);
if(layer[displayedStandardVideo],
if(layer[displayedStandardVideo].pausebgsound,
if(tour_current_played_video,
set(kill3dSoundOnResume, false);
);););
if(layer[webvideodisplay_player],
if(layer[webvideodisplay_player].pausebgsound,
if(tour_current_played_web_video,
set(kill3dSoundOnResume, false);
);););
if(tour_current_played_sound_pausesound,
if(tour_current_played_sound,
set(kill3dSoundOnResume, false);
););
if(kill3dSoundOnResume,
resumepanolocalsounds();
);
););
if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, pausepanolocalsounds();););
if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, setpanolocalsoundsvolume();););
set(tour_soundson, true);events.dispatch(playtoursoundsevent);
resumeTourSoundsActions(true,true,true,true,true);
set(tour_soundson, false);events.dispatch(stoptoursoundsevent);
pauseTourSoundsActions(true,true,true,true,true);
set(tour_soundsvolume, %1);events.dispatch(changetoursoundsevent);
div(volume, tour_soundsvolume, 100);
set(plugin[soundinterface].volume, get(volume));
set3DLocalSoundsVolume();
if(%1,
if(plugin[soundinterface],
if(plugin[soundinterface].started,
play3DLocalSounds();
);
);
);
if(%2,
if(plugin[soundinterface],
if(plugin[soundinterface].started,
resumebackgroundsound();
);
);
);
if(%1,
stop3DLocalSounds();
);
if(%2,
stopSoundActionsSounds();
);
if(%3,
stopVideoActionsSounds();
);
if(%4,
pausebackgroundsound();
);
if(%1,
if(plugin[soundinterface],
if(plugin[soundinterface].started,
resume3DLocalSounds();
);
);
);
if(%2,
resumeSoundActionsSounds();
);
if(%3,
resumeVideoActionsSounds();
);
if(%4,
if(%5,
if(plugin[soundinterface],
if(plugin[soundinterface].started,
resumebackgroundsound();
);
);
,
pausebackgroundsound();
);
);
if(%1,
pause3DLocalSounds();
);
if(%2,
pauseSoundActionsSounds();
);
if(%3,
pauseVideoActionsSounds();
);
if(%4,
if(%5,
pausebackgroundsound();
,
if(plugin[soundinterface],
if(plugin[soundinterface].started,
resumebackgroundsound();
);
);
);
);
if (tour_current_played_sound,
delete(tour_current_played_sound_paused);
stopsound(get(tour_current_played_sound));
delete(tour_current_played_sound);
set(tour_current_played_sound_state, 0);
);
if(tour_current_played_video,
if(layer[displayedStandardVideo],
layer[displayedStandardVideo].stop();
removelayer(displayedStandardVideo);
if(layer[displayedStandardVideoOverlayButton], removelayer(displayedStandardVideoOverlayButton); );
if(layer[displayedStandardVideoOverlay], removelayer(displayedStandardVideoOverlay); );
delete(tour_current_played_video);
set(tour_current_played_video_state, 0);
);
);
if(tour_current_played_web_video,
displayWebVideoObjectClose();
);
if (tour_current_played_sound,
set(resumeSoundActionsVerification, true);
if(tour_current_played_video,
if(tour_current_played_sound_state LT tour_current_played_video_state,
set(resumeSoundActionsVerification, false);
);
);
if(resumeSoundActionsVerification,
if (tour_soundson,
if(tour_current_played_sound_paused,
set(tour_current_played_sound_paused, false);
resumesound(get(tour_current_played_sound));
);
);
);
);
if(tour_current_played_video,
set(resumeVideoActionsVerification, true);
if(tour_current_played_sound,
if(tour_current_played_video_state LT tour_current_played_sound_state,
set(resumeVideoActionsVerification, false);
);
);
if(resumeVideoActionsVerification,
if (tour_soundson,
div(volume, tour_soundsvolume, 100);
if(device.flash OR (device.webgl AND !device.ios),
set(layer[displayedStandardVideo].volume, get(volume));
,
ifnot(device.ios,
js(kpanotour.Sounds.startVideosSounds(get(volume)));
);
);
,
if(device.flash OR (device.webgl AND !device.ios),
set(layer[displayedStandardVideo].volume, 0);
,
ifnot(device.ios,
js(kpanotour.Sounds.stopVideosSounds());
);
);
);
);
);
if (tour_current_played_sound,
ifnot(tour_current_played_sound_paused,
set(tour_current_played_sound_paused, true);
pausesound(get(tour_current_played_sound));
);
);
if(tour_current_played_video,
if(device.flash OR (device.webgl AND !device.ios),
set(layer[displayedStandardVideo].volume, 0);
,
ifnot(device.ios,
js(kpanotour.Sounds.stopVideosSounds());
);
);
);
changeGyroscopeState(true);
changeGyroscopeState(false);
if(layer[webvideodisplay_bg],
,
addlayer(webvideodisplay_bg);
set(layer[webvideodisplay_bg].type, container);
set(layer[webvideodisplay_bg].zorder, 98);
set(layer[webvideodisplay_bg].align, topleft);
set(layer[webvideodisplay_bg].width, 100%);
set(layer[webvideodisplay_bg].height, 100%);
set(layer[webvideodisplay_bg].bgcolor, %16);
set(layer[webvideodisplay_bg].bgalpha, %17);
set(layer[webvideodisplay_bg].bgcapture, true);
set(layer[webvideodisplay_bg].handcursor, false);
set(layer[webvideodisplay_bg].alpha, 0.0);
set(layer[webvideodisplay_bg].onclick, displayWebVideoObjectClose() );
tween(layer[webvideodisplay_bg].alpha, 1.0, 0.5, default,
addlayer(webvideodisplay_player);
set(layer[webvideodisplay_player].parent, layer[webvideodisplay_bg]);
set(layer[webvideodisplay_player].align, %13);
set(layer[webvideodisplay_player].x, %14);
set(layer[webvideodisplay_player].y, %15);
set(layer[webvideodisplay_player].alpha, 0.0);
set(layer[webvideodisplay_player].pauseautorotate, %18);
set(layer[webvideodisplay_player].pausebgsound, %19);
sub(maxstagewidth, get(stagewidth), %14);
sub(maxstageheight, get(stageheight), %15);
if('4:3' == '%3',
div(aspect, 4, 3);
,
if('2.39:1' == '%3',
div(aspect, 2.39, 1);
,
div(aspect, 16, 9);
);
);
if(%9,
if(%10 == 'pixel',
set(new_videowidth, %9);
div(new_videoheight, get(new_videowidth), get(aspect));
,
mul(new_videowidth, get(maxstagewidth), %9);
div(new_videowidth, 100);
div(new_videoheight, get(new_videowidth), get(aspect));
);
,
ifnot(%11,
set(max_videoheight, %2);
set(new_videowidth, %1);
set(new_videoheight, %2);
);
);
if(%11,
ifnot(%9,
if(%12 == 'pixel',
set(new_videoheight, %11);
mul(new_videowidth, get(new_videoheight), get(aspect));
,
mul(new_videoheight, get(maxstageheight), %11);
div(new_videoheight, 100);
mul(new_videowidth, get(new_videoheight), get(aspect));
);
set(max_videoheight, get(new_videoheight));
,
if(%12 == 'pixel',
set(max_videoheight, %11);
,
mul(max_videoheight, get(maxstageheight), %11);
div(max_videoheight, 100);
);
);
,
set(max_videoheight, get(new_videoheight));
);
if(new_videowidth GT maxstagewidth,
set(new_videowidth, get(maxstagewidth));
div(new_videoheight, get(new_videowidth), get(aspect));
);
if(max_videoheight GT maxstageheight,
set(max_videoheight, get(maxstageheight));
);
if(new_videoheight GT max_videoheight,
set(new_videoheight, get(max_videoheight));
mul(new_videowidth, get(new_videoheight), get(aspect));
);
roundval(new_videowidth);
roundval(new_videoheight);
set(layer[webvideodisplay_player].width, get(new_videowidth));
set(layer[webvideodisplay_player].height, get(new_videoheight));
set(tour_current_played_web_video, %8);
if(device.html5,
txtadd(iframecode, '[iframe width="',get(layer[webvideodisplay_player].width),'" height="',get(layer[webvideodisplay_player].height),'" src="','%4','%8','?','%6','" frameborder="0" allowfullscreen][/iframe]');
set(layer[webvideodisplay_player].html, get(iframecode));
set(layer[webvideodisplay_player].padding, 0);
set(layer[webvideodisplay_player].type, 'text');
set(layer[webvideodisplay_player].onloaded, displayWebVideoObjectReady() );
,
txtadd(embedurl, '%5','%8','%7');
set(layer[webvideodisplay_player].onloaded, registercontentsize(%1,%2);displayWebVideoObjectReady(); );
set(layer[webvideodisplay_player].url, get(embedurl));
);
);
);
if(layer[webvideodisplay_player],
set(layer[webvideodisplay_player].currentCall, true);
events.dispatch(onremovedisplayedobject);
tween(layer[webvideodisplay_player].alpha, 1.0, default, default,
if(layer[webvideodisplay_player].pauseautorotate,pauseautorotation(forcehotspot);
);
if(layer[webvideodisplay_player].pausebgsound,pauseTourSoundsActions(true,true,false,true,true););
);
);
if(layer[webvideodisplay_player],
if(layer[webvideodisplay_player].currentCall,
set(layer[webvideodisplay_player].currentCall, false);
,
set(layer[webvideodisplay_bg].onclick, null);
delete(tour_current_played_web_video);
tween(layer[webvideodisplay_player].alpha, 0.0, 0.25, default);
tween(layer[webvideodisplay_bg].alpha,0.0, 0.50, default,
if(layer[webvideodisplay_player].pauseautorotate,resumeautorotation(forcehotspot);
);
if(layer[webvideodisplay_player].pausebgsound,resumeTourSoundsActions(true,true,true,true,true););
removelayer(webvideodisplay_bg);
removelayer(webvideodisplay_player);
);
);
);