📄 window.as
字号:
{
this._parent._parent.resizeStart(this,"BR");
};
Skin.BR.onRelease = Skin.BR.onReleaseOutside = function ()
{
this._parent._parent.resizeStop();
};
// this.attachMovie("popmenu", "Menu", depth_menu);
createEmptyMovieClip("Clip", depth_content);
setSkin();
colorize();
if (centerX)
{
_x = (Globals.screenWidth - _width) / 2;
} // end if
if (centerY)
{
_y = (Globals.screenHeight - _height) / 2;
} // end if
this._visible = true;
for (i = 1; i < _parent.winList.length - 1; i++)
{
_parent[_parent.winList[i]].unFocus();
} // end of for
loadClip();
} // End of the function
function setTitle(txt)
{
if (txt != undefined)
{
this.windowTitle = txt;
} // end if
Title.T1.text = Title.T2.text = windowTitle;
Title.T1.setTextFormat(Globals.TextStyle_WTitle1);
Title.T2.setTextFormat(Globals.TextStyle_WTitle2);
} // End of the function
function setSkin()
{
// _root.numSkins = Skin.TL._totalframes;
Skin.TL.gotoAndStop(1);
Skin.TM.gotoAndStop(2);
Skin.TR.gotoAndStop(3);
Skin.R.gotoAndStop(4);
Skin.BR.gotoAndStop(5);
Skin.BM.gotoAndStop(6);
Skin.BL.gotoAndStop(7);
Skin.L.gotoAndStop(8);
Skin.BG.gotoAndStop(9);
arrange();
} // End of the function
function colorize()
{
} // End of the function
function arrange(center)
{
if (center)
{
_x = int(Globals.screenWidth-Clip.win_width) / 2;
_y = int(Globals.screenHeight-Clip.win_height) / 2;
//trace(cw+","+_y)
} // end if
Clip.win_width=Clip.win_width==undefined ? 0 : Clip.win_width;
Clip.win_height=Clip.win_height==undefined ? 0 : Clip.win_height;
cw = Clip.win_width >= min_width ? (Clip.win_width+10) : (min_width+10);
ch = Clip.win_height >= min_height ? (Clip.win_height) : (min_height);
//trace(cw+","+ch);
Skin.BG._width = cw-12+2;
Skin.BG._x=6-2;
Skin.BG._y=0;
Skin.BG._height = ch;
Skin.TM._width = cw - Skin.TL._width - Skin.TR._width + 20+2;
Skin.TM._x = Skin.TL._width-10-2;
TR._x = Skin.TM._x + Skin.TM._width - 10;
Skin.TR._x = Skin.TM._x + Skin.TM._width - 10;
Skin.BL._y = Skin.BM._y = Skin.BR._y = ch;
Skin.BM._width = cw - Skin.BL._width - Skin.BR._width + 20+2;
Skin.BM._x = Skin.BL._width-10-2;
Skin.BR._x = Skin.BM._x + Skin.BM._width - 10;
Skin.L._y=0;
//Skin.L._x=-2;
Skin.L._height=Skin.R._height=ch;
Skin.R._y=0;
Skin.R._x=cw-16;
RI._x = cw - RI._width;
RI._y = ch;
Bar._width = Skin.BG._width;
Bar._height =10;
Bar._x = 4;
Bar._y = Skin.BG._height - Bar._height - 4;
Buttons._x = Skin.TR._x + Number(Globals.Settings.winbuttons_offset_x);
Title.T1._width = Title.T2._width = Skin.TM._width;
Title.T1._height = Title.T2._height = Skin.TM._height;
//Shadow.clear();
o = Number(Globals.Settings.shadow_offset);
w = cw;
h = Skin._height;
//Shadow.beginFill("0x000000", 100);
//Shadow.lineTo(w, 0);
//Shadow.lineTo(w, h);
//Shadow.lineTo(0, h);
// Shadow.lineTo(0, 0);
// Shadow.endFill();
// Shadow._x = o;
// Shadow._y = Skin.TL._height * -1 + o;
} // End of the function
function dragStart()
{//trace(maxsized);
if (maxsized)
{
return(undefined);
} // end if
clearInterval(this.timer_slide);
Shadow._x = Shadow._x + 5;
Shadow._y = Shadow._y + 5;
this.offx = _xmouse;
this.offy = _ymouse;
this.lx = _x;
this.ly = _y;
this.onMouseMove = dragging;
Title.onRelease = Title.onReleaseOutside = function ()
{
this._parent.dragStop();
};
} // End of the function
function dragStop()
{ if (maxsized)
{
return(undefined);
} // end if
this.xs = _x - lx;
this.ys = _y - ly;
Shadow._x = Shadow._x - 5;
Shadow._y = Shadow._y - 5;
this.onMouseMove =undefined;
if (Globals.Settings.windows_slide_effect == "Yes")
{
this.timer_slide = setInterval(this, "sliding", 10);
this.sliding();
} // end if
} // End of the function
function dragging()
{//trace(NoDrgging);
if (maxsized||istop)
{
return(undefined);
} // end if
lx = _x;
ly = _y;
_x = int(_root._xmouse - offx);
_y = int(_root._ymouse - offy);
if (_x >= 1)
{
if (Globals.screenWidth+22< _x + Skin._width)
{
_x = Globals.screenWidth+22 - Skin._width;
} // end if
}
else
{
_x = 1;
} // end if
if (_y >= 32)
{
if (Globals.screenHeight+22< _y + Skin._height)
{
_y = Globals.screenHeight+22 - Skin._height;
} // end if
}
else
{
_y = 32;
} // end if
updateAfterEvent();
} // End of the function
function dragging222()
{
if (_x >= 1)
{
if (Globals.screenWidth+22< _x + Skin._width)
{
_x = Globals.screenWidth+22 - Skin._width;
} // end if
}
else
{
_x = 1;
} // end if
if (_y >= 32)
{
if (Globals.screenHeight+22< _y + Skin._height)
{
_y = Globals.screenHeight+22 - Skin._height;
} // end if
}
else
{
_y = 32;
} // end if
updateAfterEvent();
}
function sliding()
{
if (Math.abs(xs) < 0.500000 && Math.abs(ys) < 0.500000)
{
clearInterval(this.timer_slide);
} // end if
_x = int(_x + xs);
_y = int(_y + ys);
if (_x >= 0)
{
if (Globals.screenWidth < _x + _width)
{
xs = xs * -1;
_x = _x + xs;
} // end if
}
else
{
xs = xs * -1;
_x = _x + xs;
} // end if
if (_y >= 0)
{
if (Globals.screenHeight < _y + _height)
{
ys = ys * -1;
_y = _y + ys;
} // end if
}
else
{
ys = ys * -1;
_y = _y + ys;
} // end if
xs = xs * 0.850000;
ys = ys * 0.850000;
updateAfterEvent();
} // End of the function
function resizeStart(Cp,Tp)
{
this.focus();
this.offx = Cp._xmouse;
this.offy = Cp._ymouse;
this.TP=Tp;
this.onMouseMove = function ()
{ xmouse=(this._x+_xmouse)>Globals.screenWidth ? xmouse : _xmouse;
ymouse=(this._y+_ymouse)>Globals.screenHeight-50 ? ymouse : _ymouse;
switch (TP){
case "R":
Clip.win_width = xmouse;
break;
case "L":
Clip.win_width =Clip.win_width+(-xmouse);
_x=_x+(xmouse);
//trace (xmouse+","+offx);
break;
case "BM":
Clip.win_height = ymouse + offy;
break;
case "BR":
Clip.win_width = xmouse;
Clip.win_height = ymouse + offy;
//trace (xmouse+","+offx);
break;
case "BL":
Clip.win_height = ymouse + offy;
break;
}
if (Clip.win_width < min_width)
{
Clip.win_width = min_width;
} // end if
if (Clip.win_height < min_height)
{
Clip.win_height = min_height;
} // end if
Clip.reload();
arrange();
updateAfterEvent();
} }// End of the function
function resizeStop()
{_root.Nochangemouse();
this.onMouseMove = undefined;
} // End of the function
function showOptions()
{
Menu._y = Menu.margin * -1 * 2;
Menu._x = _xmouse;
Menu._visible = true;
} // End of the function
function remove()
{
_root.Hourglass.hide();
_root.hideTooltip();
clearInterval(this.timer_load);
clearInterval(this.timer_slide);
_parent.closeEffect(this);
_parent.removeWindow(this);
} // End of the function
function minimize()
{
if (!minimizable || minimized)
{
return(undefined);
} // end if
_root.playSound("windowMinimize");
this.onTop = false;
this.minimized = true;
//this._visible = false;
Window = _parent[_parent.winList[_parent.winList.length - 2]];
if (!Window.minimized)
{
Window.focus();
} // end if
_parent.Taskbar.update();
this.MyTaskButton.flash(30, 1);
_parent.minMaxEffect(this, MyTaskButton);
} // End of the function
function maximize()
{
if (!minimizable || !minimized)
{
return(undefined);
} // end if
_root.playSound("windowMaximize");
this.minimized = false;
this._visible = true;
arrange();
focus();
_parent.minMaxEffect(this, MyTaskButton);
} // End of the function
function maxsize(type)
{
if (this.maxsized==true)
{NOmaxsize();
return(undefined);}
if (type==undefined)
{this.win_width=Clip.win_width;
this.win_height=Clip.win_height;
this.win_x=_x;
this.win_y=_y;}
this.maxsized=true;
this.draggable=false;
Clip.win_width=Globals.screenWidth+3;
Clip.win_height=Globals.screenHeight-_parent.Taskbar._height-15;
Clip.reload();
_x = -5;
_y = 31;
arrange();
focus();
//_parent.minMaxEffect(this, MyTaskButton);
} // End of the function
function NOmaxsize()
{
Clip.win_width=this.win_width;
Clip.win_height=this.win_height;
_x=this.win_x;
_y=this.win_y;
this.maxsized=false;
draggable=true;
Clip.reload();
arrange();
focus();
// _parent.minMaxEffect(this, MyTaskButton);
} // End of the function
function focus()
{
if (minimized)
{
maximize();
return(undefined);
} // end if
if (listNumber == winList.length - 1 || listNumber == undefined)
{
return(false);
} // end if
for (i = listNumber; i < _parent.winList.length - 1; i++)
{
A = _parent.winList[i];
B = _parent.winList[i + 1];
_parent[A].swapDepths(_parent[B]);
_parent.winList[i] = B;
_parent.winList[i + 1] = A;
_parent[_parent.winList[i]].listNumber = i;
_parent[_parent.winList[i + 1]].listNumber = i + 1;
} // end of for
this.onTop = true;
Skin.setBrightness(0);
Title.T1.setTextFormat(Globals.TextStyle_WTitle1);
Title.T2.setTextFormat(Globals.TextStyle_WTitle2);
for (i = 1; i < _parent.winList.length - 1; i++)
{
_parent[_parent.winList[i]].unFocus();
} // end of for
this.onTop = true;
_parent.Taskbar.update();
} // End of the function
function unFocus()
{
this.onTop = false;
Skin.setBrightness(-25);
Title.T2.setTextFormat(Globals.TextStyle_WTitle1);
Title.T1.setTextFormat(Globals.TextStyle_WTitle2);
} // End of the function
depth_shadow = 1;
depth_skin = 2;
depth_status = 3;
depth_buttons = 4;
depth_title = 5;
depth_icon = 6;
depth_load_icon = 7;
depth_resize = 8;
depth_content = 19;
depth_menu = 20;
min_width = 420;
min_height = 250;
closeable = true;
minimizable = true;
maxsized=false;
resizable = true;
draggable = true;
NoDrgging=false;
windowIcon = Number(Globals.Settings.winicon_default);
if (clipName != undefined)
{
create();
} // end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -