⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startmenu.as

📁 flash 仿VISTA windows 效果 源码
💻 AS
字号:
this.attachMovie("skin_taskbar", "Startbutton", 3);
this.attachMovie("skin_taskbar", "Tray", 4);
function checkList()
{
    b = "";
    a = "";
    if (a + winList != b + _parent.winList)
    {
        update();
    } // end if
} // End of the function
function update()
{
    this.winList = _parent.winList.concat();
    tempList = winList.concat();
    tempList.sort();
    if (Buttonbar)
    {
        removeMovieClip(Buttonbar);
    } // end if
    createEmptyMovieClip("Buttonbar", depth_buttonbar);
    Buttonbar._x = aaaa._x + aaaa._width + 5;
    for (i = 1; i < tempList.length; i++)
    {
        Buttonbar.attachMovie("skin_taskbar", "B" + i, i);
        But = Buttonbar["B" + i];
        But.MyWindow = _parent[tempList[i]];
        But.MyWindow.MyTaskButton = But;
		
        if (But.MyWindow.minimized)
        {
			
			if (But.MyWindow.onTop)
			{But.gotoAndStop(9);}
			else
			{But.gotoAndStop(8);}
			But.bt1.MyWindow=But.MyWindow;
            But.bt1.onRollOver = function ()
            {
                _root.showTooltip(this.MyWindow.windowTitle + " " + Globals.CurrentLanguage.text_minimized);
            };
            But.bt1.onRollOut = function ()
            {
                _root.hideTooltip();
            };
            But.bt1.onPress = function ()
            {
                this.MyWindow.maximize();
                _root.hideTooltip();
                _root.playSound("buttonClick");
                _root.Taskbar.update();
            };
        }
        else
        {
			if (But.MyWindow.onTop)
			{But.gotoAndStop(9);}
			else
			{But.gotoAndStop(8);}
			
			But.bt1.MyWindow=But.MyWindow;
			
            But.bt1.onRollOver = function ()
            {
                _root.showTooltip(this.MyWindow.windowTitle);
               // _root.showOutline(this.MyWindow);
            };
            But.bt1.onRollOut = function ()
            {
                _root.hideTooltip();
                _root.hideOutline();
            };
            But.bt1.onPress = function ()
            {
                if (this.MyWindow.listNumber == _root.winList.length - 1)
                {
                    this.MyWindow.minimize();
                }
                else
                {
                    this.MyWindow.focus();
                } // end if
                _root.hideTooltip();
                _root.hideOutline();
                _root.playSound("buttonClick");
            };
        } // end if
        w = But._width;
        h = But._height;
		But._alpha=70;
        But._x = (i - 1) * (w + 2);
        But._y = Number(Globals.Settings.taskbutton_offset_y);
        But.attachMovie("skin_icons", "Icon", 1);
        But.Icon.gotoAndStop(But.MyWindow.windowIcon);
        But.Icon._width = 18;
        But.Icon._height = 18;
        But.Icon._x =6;
		But.Icon._y = 4;
    } // end of for
} // End of the function
function colorize()
{
    Color1 = new Color(Startbutton);
    Color2 = new Color(Bar);
    Color3 = new Color(Slider);
    Color4 = new Color(Tray);
    Color5 = new Color(ssss);
    Color6 = new Color(aaaa);
    SkinColorT = new Object();
    ra = parseInt(Globals.CurrentScheme.color_background.substring(0, 2), 16);
    ga = parseInt(Globals.CurrentScheme.color_background.substring(2, 4), 16);
    ba = parseInt(Globals.CurrentScheme.color_background.substring(4, 6), 16);
    ra = ra + Number(Globals.Settings.skin_brightness);
    ga = ga + Number(Globals.Settings.skin_brightness);
    ba = ba + Number(Globals.Settings.skin_brightness);
    SkinColorT.ra = ra;
    SkinColorT.ga = ga;
    SkinColorT.ba = ba;
    Color1.setTransform(SkinColorT);
    Color2.setTransform(SkinColorT);
    Color3.setTransform(SkinColorT);
    Color4.setTransform(SkinColorT);
    Color5.setTransform(SkinColorT);
    Color6.setTransform(SkinColorT);
} // End of the function
depth_quickbar = 1;
depth_buttonbar = 2;
depth_tray = 10;
depth_volume_icon = 11;
depth_close_icon = 12;
Bar.gotoAndStop(3);
Bar._width = Globals.screenWidth;
Bar._x = Bar._y = 0;
if (Globals.Menu.permanent == "Yes")
{
    Startbutton._visible = false;
}
else
{
    Startbutton.gotoAndStop(2);
} // end if
//Startbutton._height = Bar._height - 4;
Startbutton._xscale = Startbutton._yscale;
Startbutton._y = 0;
Startbutton._x = 5;
createEmptyMovieClip("Quickbar", depth_quickbar);
Quickbar._x = Startbutton._width + 24;
for (i = 1; i < 99 && Globals.Taskbar.Item[i - 1]; i++)
{
    caption = Globals.Taskbar.Item[i - 1].caption;
    caption = caption.indexOf("text_") > -1 ? (Globals.CurrentLanguage[caption]) : (caption);
    Quickbar.attachMovie("skin_taskbar", "B" + i, i);
    But = Quickbar["B" + i];
    But.gotoAndStop(7);
    w = But._width;
    h = But._height;
    But._x = (i - 1) * (w + 2);
    But._y = Number(Globals.Settings.taskbutton_offset_y);
    But.link = Globals.Taskbar.Item[i - 1].link;
    But.caption = Globals.CurrentLanguage.text_open + " \'\'" + caption + "\'\'";
    But.attachMovie("skin_icons", "Icon", 1);
    But.Icon.gotoAndStop(Number(Globals.Taskbar.Item[i - 1].icon));
    But.Icon._width = w - 4;
    But.Icon._height = h - 4;
    But.Icon._x = But.Icon._y = 2;
    But.Icon.attachMovie("skin_icons", "Symbol", 1);
    But.Icon.Symbol.gotoAndStop(25);
    But.Icon.Symbol._width = But.Icon.Symbol._height = But._width / 2;
    But.Icon.Symbol._x = -4;
    But.Icon.Symbol._y = But._height;
    But.Icon.Symbol._visible = Globals.Icons.shortcut_symbols == "Yes" ? (1) : (0);
    But.gotoAndStop(7);
    But.Root = this._parent;
    But.onRollOver = function ()
    {
        _root.playSound("menuHover");
        this.gotoAndStop(6);
        this.Root.showTooltip(this.caption);
    };
    But.onRollOut = But.onDragOut = function ()
    {
        this.gotoAndStop(7);
        this.Root.hideTooltip();
    };
    But.onPress = function ()
    {
        _root.playSound("buttonClick");
        this.gotoAndStop(7);
        this.Root.openLink(this.link);
    };
    But.onRelease = function ()
    {
        this.gotoAndStop(6);
    };
} // end of for
Slider.gotoAndStop(4);
Slider._x = Quickbar._x + Quickbar._width + 24;
Slider.move = function ()
{
    this.x = this._parent._xmouse;
    if (this._parent.Quickbar._x + this._parent.Quickbar._width < this.x - this.offset && this.x - this.offset < this._parent.Tray._x - this._width)
    {
        this._x = this.x - this.offset;
        this._parent.Buttonbar._x = this._x + this._width;
        updateAfterEvent();
    } // end if
};
Slider.onPress = function ()
{
    this.offset = this._xmouse;
    this.onMouseMove = this.move;
};
Slider.onRelease = Slider.onReleaseOutside = function ()
{
    this.onMouseMove = undefined;
};
Tray.gotoAndStop(5);
Tray._x = Globals.screenWidth - Tray._width;
if (Globals.Settings.taskbar_volume_icon == "Yes")
{
    attachMovie("skin_icons", "VolumeIcon", depth_volume_icon);
    VolumeIcon.gotoAndStop(15);
    VolumeIcon._width = 16;
    VolumeIcon._height = 16;
    VolumeIcon._x = Tray._x;
    VolumeIcon._y = (Tray._height - VolumeIcon._height) / 2;
    VolumeIcon.onRollOver = function ()
    {
        _root.showTooltip(Globals.CurrentLanguage.text_volume_icon);
    };
    VolumeIcon.onRollOut = function ()
    {
        _root.hideTooltip();
    };
    VolumeIcon.onPress = function ()
    {
        VolumeIcon.flash(150, 3);
        _root.hideTooltip();
        _root.VolumeControl._visible = true;
        _root.playSound("buttonClick");
    };
} // end if
/*attachMovie("close_icon", "CloseIcon", depth_close_icon);
CloseIcon._width = CloseIcon._height = VolumeIcon._width;
CloseIcon._x = VolumeIcon._x + CloseIcon._width + 2;
CloseIcon._y = VolumeIcon._y;*/
Tray.showTime = function ()
{
    theTime = new Date();
    cHour = theTime.getHours();
    cMin = theTime.getMinutes();
    if (cHour < 10)
    {
        cHour = "0" + cHour;
    } // end if
    if (cMin < 10)
    {
        cMin = "0" + cMin;
    } // end if
    this.time = cHour + ":" + cMin;
};
Tray.timer_clock = setInterval(this.Tray, "showTime", 3000);
Tray.showTime();
_y = Globals.Settings.taskbar_position == "Top" ? (0) : (Globals.screenHeight - _height + 14);
Startbutton.onRollOver = function ()
{
    _root.showTooltip(Globals.CurrentLanguage.text_startbutton);
};
Startbutton.onRollOut = function ()
{
    _root.hideTooltip();
};
Startbutton.onPress = function ()
{
    _root.hideTooltip();
    if (_root.Startmenu._visible)
    {
        _root.playSound("buttonClick");
        _root.Startmenu.hideMe();
        this.gotoAndStop(1);
    }
    else
    {
        _root.playSound("menuOpen");
        _root.Startmenu.showMe();
        this.gotoAndStop(2);
    } // end if
};
//ssss._height = Bar._height - 4;
ssss._width = Globals.screenWidth;
ssss._y = 0;
ssss._x = 0;
//aaaa._height = Bar._height - 4;
aaaa._y = 0;
aaaa._x = Quickbar._x + Quickbar._width + 5;
//colorize();
this.timer_update = setInterval(this, "checkList", 500);
function reload(){
_y = Globals.Settings.taskbar_position == "Top" ? (0) : (Globals.screenHeight - 31);
ssss._width = Globals.screenWidth;
Tray._x = Globals.screenWidth - Tray._width;
VolumeIcon._x = Tray._x;
//CloseIcon._x = VolumeIcon._x + CloseIcon._width + 2;
}
reload();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -