copy(layer[skin_control_bar].y, skin_settings.controlbar_offset);
copy(layer[skin_control_bar].y_opened, skin_settings.controlbar_offset);
add(layer[skin_scroll_window].y, layer[skin_control_bar].height, layer[skin_control_bar].y);
add(layer[skin_scroll_window].y_opened, layer[skin_control_bar].height, layer[skin_control_bar].y_opened);
if(skin_settings.thumbs_opened, set(layer[skin_thumbs].state,'opened'); set(layer[skin_thumbs_container].visible,true); );
copy(layer[skin_thumbs].draggable, skin_settings.thumbs_dragging);
if(skin_settings.thumbs_onhoverscrolling,
ifnot(device.touchdevice, set(layer[skin_thumbs].draggable, false));
set(layer[skin_thumbs].onhover_autoscrolling, true);
);
if(device.android, if(device.flash, set(skin_settings.bingmaps_zoombuttons, false); ));
skin_addthumbs();
skin_onresize();
skin_updatescroll();
copy(usegyro, skin_settings.gyro);
if(device.desktop, set(usegyro, false));
if(device.flash, set(usegyro, false));
if(usegyro, copy(plugin[skin_gyro].url, plugin[skin_gyro].html5_url); );
skin_update_scene_infos();
copy(thumbwidth, skin_settings.thumbs_width);
copy(thumbheight, skin_settings.thumbs_height);
copy(thumbpadding, skin_settings.thumbs_padding);
copy(thumbcrop, skin_settings.thumbs_crop);
add(thumbxoffset, thumbwidth, thumbpadding);
mul(thumbxcenter, thumbxoffset, 0.5);
mul(thumbbarwidth, thumbxoffset, skin_thumbs.thumb.count);
add(thumbbarwidth, thumbpadding);
add(thumbbarheight, thumbpadding, thumbheight);
add(thumbbarheight, thumbpadding);
if (skin_settings.thumbs_scrollindicator,
copy(layer[skin_thumbs_scrollindicator].y, thumbbarheight);
add(thumbbarheight, layer[skin_thumbs_scrollindicator].height);
);
copy(layer[skin_thumbs].height, thumbbarheight);
copy(layer[skin_thumbs].width, thumbbarwidth);
mul(halfheight, thumbbarheight, 0.5);
copy(layer[skin_thumbs_scrollleft].y, halfheight);
copy(layer[skin_thumbs_scrollright].y, halfheight);
for(set(i,0), i LT skin_thumbs.thumb.count, inc(i),
txtadd(thumbname,'skin_thumb_',get(i));
addlayer(get(thumbname));
copy(layer[get(thumbname)].url, skin_thumbs.thumb[get(i)].url);
set(layer[get(thumbname)].keep, true);
set(layer[get(thumbname)].parent, 'skin_thumbs');
set(layer[get(thumbname)].align, lefttop);
copy(layer[get(thumbname)].crop, thumbcrop);
copy(layer[get(thumbname)].width, thumbwidth);
copy(layer[get(thumbname)].height, thumbheight);
mul(thumbx, i, thumbxoffset);
add(thumbx, thumbpadding);
copy(layer[get(thumbname)].x, thumbx);
copy(layer[get(thumbname)].y, thumbpadding);
add(skin_thumbs.thumb[get(i)].thumbx, thumbx, thumbxcenter);
copy(skin_thumbs.thumb[get(i)].thumby, thumbpadding);
set(layer[get(thumbname)].linkedthumb, get(skin_thumbs.thumb[get(i)].name) );
set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); skin_movetothumb(get(linkedthumb)); );
if(skin_settings.thumbs_text,
txtadd(thumbtext, 'skin_thumbtext_', get(i));
addlayer(get(thumbtext));
layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
set(layer[get(thumbtext)].keep, true);
set(layer[get(thumbtext)].parent, get(thumbname));
set(layer[get(thumbtext)].html, get(skin_thumbs.thumb[get(i)].title));
);
);
mul(mh, stageheight, -1);
if(layer[skin_thumbs].state == 'opened', add(mh,layer[skin_thumbs].height); );
if(layer[skin_map].state == 'opened', sub(hh,stageheight,skin_settings.controlbar_offset); sub(hh,layer[skin_control_bar].height); sub(hh,32); copy(layer[skin_map].height, hh); add(mh,hh); );
set(layer[skin_scroll_layer].y, get(mh));
if(stagewidth LT 480,
skin_showbuttons(false);
set(layer[skin_btn_gyro].align, leftbottom);
set(layer[skin_btn_gyro].x, 90);
,
skin_showbuttons(true);
set(layer[skin_btn_gyro].align, bottom);
set(layer[skin_btn_gyro].x, 140);
);
set(layer[skin_btn_lt].visible, %1);
set(layer[skin_btn_rt].visible, %1);
set(layer[skin_btn_up].visible, %1);
set(layer[skin_btn_dn].visible, %1);
set(layer[skin_btn_in].visible, %1);
set(layer[skin_btn_ou].visible, %1);
if(layer[skin_thumbs].loaded,
layer[skin_thumbs].setcenter(get(skin_thumbs.thumb[get(skin_thumbs.selection)].thumbx), get(skin_thumbs.thumb[get(skin_thumbs.selection)].thumby));
);
copy(padding,skin_settings.thumbs_padding);
if(skin_settings.thumbs_scrollbuttons,
if(loverflow GT 0, set(layer[skin_thumbs_scrollleft].visible,true), set(layer[skin_thumbs_scrollleft].visible,false) );
if(roverflow GT 0, set(layer[skin_thumbs_scrollright].visible,true), set(layer[skin_thumbs_scrollright].visible,false) );
);
if(skin_settings.thumbs_scrollindicator,
if(woverflow GT 0,
set(layer[skin_thumbs_scrollindicator].visible,true);
sub(iw,pixelwidth,woverflow);
div(pw,iw,pixelwidth);
div(px,loverflow,woverflow);
mul(pw,iw);
copy(layer[skin_thumbs_scrollindicator].width,pw);
sub(iw,pw);
sub(iw,padding);
sub(iw,padding);
mul(px,iw);
add(px,padding);
copy(layer[skin_thumbs_scrollindicator].x,px);
,
set(layer[skin_thumbs_scrollindicator].visible,false);
);
);
copy(layer[skin_title].html, title);
delayedcall(0.1, set(layer[skin_title].visible,true) );
set(layer[skin_btn_prev].enabled, true);
set(layer[skin_btn_prev].alpha, 1.0);
set(layer[skin_btn_next].enabled, true);
set(layer[skin_btn_next].alpha, 1.0);
txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(skin_thumbs.thumb[get(skin_thumbs.selection)].index));
set(layer[skin_thumbborder].visible, true);
add(newsceneindex, skin_thumbs.thumb[get(skin_thumbs.selection)].index, %1);
if(newsceneindex GE 0,
if(newsceneindex LT skin_thumbs.thumb.count,
txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(newsceneindex));
layer[skin_thumbs].scrolltocenter(get(skin_thumbs.thumb[get(newsceneindex)].thumbx), get(skin_thumbs.thumb[get(newsceneindex)].thumby));
skin_movetothumb(get(skin_thumbs.thumb[get(newsceneindex)].name));
);
);
add(newsceneindex, skin_thumbs.thumb[get(skin_thumbs.selection)].index, %1);
sub(lastsceneindex, skin_thumbs.thumb.count, 1);
if(newsceneindex LT 0, copy(newsceneindex,lastsceneindex));
if(newsceneindex GT lastsceneindex, set(newsceneindex,0));
layer[skin_thumbs].scrolltocenter(get(skin_thumbs.thumb[get(newsceneindex)].thumbx), get(skin_thumbs.thumb[get(newsceneindex)].thumby));
skin_movetothumb(get(skin_thumbs.thumb[get(newsceneindex)].name));
set(layer[skin_loadingtext].visible, %1);
if(%1 != null,
set(strength,0.7);
if(%2 != null, set(strength,%2));
set(layer[skin_buttonglow].parent, %1);
set(layer[skin_buttonglow].visible, true);
tween(layer[skin_buttonglow].alpha, get(strength), 0.07);
,
tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default, set(layer[skin_buttonglow].parent, null); set(layer[skin_buttonglow].visible, false); );
);
if(layer[skin_map].state != 'closed', skin_showmap(false); wait(0.4); );
if(layer[skin_thumbs].state != 'closed', skin_showthumbs(false); wait(0.25); );
tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window].y_closed), 0.5, easeOutQuint);
tween(layer[skin_control_bar].y, get(layer[skin_control_bar].y_closed), 0.5, easeOutQuint);
set(layer[skin_btn_show].visible,true);
tween(layer[skin_btn_show].alpha, 1, 0.25, easeOutQuint);
tween(layer[photocredits].x, 44);
tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window].y_opened), 0.5, easeOutQuint);
tween(layer[skin_control_bar].y, get(layer[skin_control_bar].y_opened), 0.5, easeOutQuint);
set(layer[skin_btn_show].visible,false);
tween(layer[skin_btn_show].alpha,0,0);
tween(layer[photocredits].x, 6);
if(%1 == null, if(layer[skin_thumbs].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
mul(mh, layer[skin_scroll_layer].pixelheight, -1);
if(layer[skin_scroll_layer].y == -100%, copy(layer[skin_scroll_layer].y,mh));
if(show,
set(layer[skin_thumbs].state, 'opened');
add(mh, layer[skin_thumbs].height);
tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
set(layer[skin_thumbs_container].visible, true);
tween(layer[skin_thumbs_container].alpha, 1.0, 0.25);
tween(layer[skin_map].alpha, 0.0, 0.25, default, set(layer[skin_map].visible,false));
,
set(layer[skin_thumbs].state, 'closed');
tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_thumbs_container].visible, false););
);
if(%1 == null, if(layer[skin_map].state == 'closed', set(show,true), set(show,false)); , set(show,%1); );
mul(mh, layer[skin_scroll_layer].pixelheight, -1);
if(layer[skin_scroll_layer].y == -100%, copy(layer[skin_scroll_layer].y,mh));
if(show,
tween(layer[skin_logo].alpha, 0.0, 0.25, default, set(layer[skin_logo].visible,false));
tween(layer[skin_thumbs_container].alpha, 0.0, 0.25, default, set(layer[skin_thumbs_container].visible,false));
set(layer[skin_map].visible, true);
tween(layer[skin_map].alpha, 1.0, 0.25);
set(layer[skin_map].state, 'opened');
sub(hh,stageheight,skin_settings.controlbar_offset);
sub(hh,layer[skin_control_bar].height);
sub(hh,32);
add(mh,hh);
copy(layer[skin_map].height, hh);
tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
,
set(layer[skin_map].state, 'closed');
set(layer[skin_logo].visible, true); tween(layer[skin_logo].alpha, 1.0, 0.25);
tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_map].visible,false) );
);
if(layer[skin_logo].state == 'small',
set(layer[skin_logo].state, 'opening');
copy(backup_logo_align, layer[skin_logo].align);
copy(backup_logo_x, layer[skin_logo].x);
copy(backup_logo_y, layer[skin_logo].y);
copy(backup_logo_scale, layer[skin_logo].scale);
layer[skin_logo].changeorigin(center);
tween(layer[skin_logo].x, 0, 0.5, easeOutQuint);
tween(layer[skin_logo].y, 0, 0.5, easeOutQuint);
tween(layer[skin_logo].scale, 1, 0.5, easeOutQuint);
delayedcall(0.5, set(layer[skin_logo].state, 'opened') );
delayedcall(0, set(events[skin_events].onmouseup, delayedcall(0, skin_closelogo()) ) );
);
if(layer[skin_logo].state == 'opened',
set(layer[skin_logo].state, 'closing');
layer[skin_logo].changeorigin(get(backup_logo_align));
if(%1 == 'now',
stoptween(layer[skin_logo].x, layer[skin_logo].y, layer[skin_logo].scale);
copy(layer[skin_logo].x, backup_logo_x);
copy(layer[skin_logo].y, backup_logo_y);
copy(layer[skin_logo].scale, backup_logo_scale);
set(layer[skin_logo].state, 'small');
,
tween(layer[skin_logo].x, get(backup_logo_x), 0.5, easeOutQuint);
tween(layer[skin_logo].y, get(backup_logo_y), 0.5, easeOutQuint);
tween(layer[skin_logo].scale, get(backup_logo_scale), 0.5, easeOutQuint);
delayedcall(0.5, set(layer[skin_logo].state, 'small'));
);
set(events[skin_events].onmouseup, null);
);
set(skin_thumbs.selection,%1);
skin_update_scene_infos();
tween(view.fisheye, get(skin_thumbs.thumb[%1].fisheye), 2);
copy(targetfov, skin_thumbs.thumb[%1].fov);
copy(currentfov, view.fov);
set(zoom_out_and_in, false);
if(targetfov LT 100, set(zoom_out_and_in, true));
if(currentfov GT 100, set(zoom_out_and_in, false));
if(zoom_out_and_in,
oninterrupt(break);
zoomto(100,smooth(90,90,90));
moveto(get(skin_thumbs.thumb[%1].hlookat),get(skin_thumbs.thumb[%1].vlookat),smooth(90,90,90));
zoomto(get(targetfov),smooth(90,90,90));
,
oninterrupt(break);
lookto(get(skin_thumbs.thumb[%1].hlookat),get(skin_thumbs.thumb[%1].vlookat),get(targetfov),smooth(90,90,90));
);