if(scene[get(xml.scene)].video,
progressbar_stop();
,
mul(progress_val, get(progress.progress), 100);
txtadd(progress_percent, get(progress_val),"%");
set(layer[progressbar_bar].width, get(progress_percent));
if (device.html5,
mul(xcrop, layer[progressbarwheel].frame, 64);
txtadd(layer[progressbarwheel].crop, get(xcrop), '|0|64|64');
inc(layer[progressbarwheel].frame);
if(layer[progressbarwheel].frame GE layer[progressbarwheel].frames, set(layer[progressbarwheel].frame,0));
);
delayedcall(progressbar_progresscall, 0.1,progressbar_start());
if(progress_val == 100,
progressbar_stop();
);
);
stopdelayedcall(progressbar_progresscall);
set(layer[progressbar_bg].visible, false);
set(layer[progressbar_bar].width, "0%");
if (device.html5, set(layer[progressbarwheel].visible, false););
if(plugin[gyroscope],
if(scene[get(xml.scene)].full360,
set(sceneisfull360, false);
sub(viewhfov, panoview.hmax, panoview.hmin);
if (viewhfov == 360,
sub(viewvfov, panoview.vmax, panoview.vmin);
if (viewvfov == 180,
set(sceneisfull360, true);
);
);
if (sceneisfull360,
set(plugin[gyroscope].camroll, true);
,
set(plugin[gyroscope].camroll, false);
);
,
set(plugin[gyroscope].camroll, false);
);
);
if(plugin[gyroscope],
if (plugin[gyroscope].isavailable,
if(%1,
set(plugin[gyroscope].activated,true);
,
set(plugin[gyroscope].activated,false);
);
if (%1 != plugin[gyroscope].enabled,
if(plugin[gyroscope].activated,
switch(plugin[gyroscope].enabled);
,
set(plugin[gyroscope].enabled, false);
);
if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
);
);
);
if(plugin[gyroscope],
if (plugin[gyroscope].isavailable,
set(sceneisfull360, false);
if (scene[get(xml.scene)].full360,
sub(viewhfov, panoview.hmax, panoview.hmin);
if (viewhfov == 360,
sub(viewvfov, panoview.vmax, panoview.vmin);
if (viewvfov == 180,
set(sceneisfull360, true);
);
);
);
set(delaythegyrocheck, false);
if (sceneisfull360 AND tour_firstlittleplanet, set(delaythegyrocheck, true));
ifnot(delaythegyrocheck,
switch(plugin[gyroscope].enabled);
set(plugin[gyroscope].activated,true);
set(tour_gyroscopedevices, true);
events.dispatch(ongyroscopeavailable);
,
delayedcall(1, checkGyroAvailability(););
);
,
set(tour_gyroscopedevices, false);
);
if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
,
checkGyroUnavailable();
);
set(plugin[gyroscope].activated, false);
set(plugin[gyroscope].enabled, false);
set(tour_gyroscopedevices, false);
events.dispatch(ongyroscopeunavailable);
if(scene[get(xml.scene)].video,
set(layer[LoaderImage].visible, false);
,
set(layer[LoaderImage].visible, %1);
);