FLASH 全屏ACTION 代码


// Action script...

// [Action in Frame 1]
Stage.scaleMode = "noScale";
Stage.align = "TL";
var stageListener = new Object();
stageListener.onResize = function ()
{
    loading.onEnterFrame = function ()
    {
        this._x = this._x + (Stage.width / 2 - this._x) * 3.000000E-001;
        this._y = this._y + (Stage.height / 2 - this._y) * 3.000000E-001;
    };
    bg._width = Stage.width;
    bg._height = Stage.height;
};
Stage.addListener(stageListener);
loading._x = Stage.width / 2;
loading._y = Stage.height / 2;
bg._width = Stage.width;
bg._height = Stage.height;
onEnterFrame = function ()
{
    var _loc2 = getBytesLoaded();
    var _loc1 = getBytesTotal();
    percent = Math.round(_loc2 / _loc1 * 100);
    loading.percenty = percent + "%";
    if (_loc2 == _loc1)
    {
        delete onEnterFrame;
        play ();
    } // end if
};

// [Action in Frame 2]
stop ();
var stageListener = new Object();
stageListener.onResize = function ()
{
    mainAnim.onEnterFrame = function ()
    {
        this._x = this._x + (Stage.width / 2 - this._x) * 3.000000E-001;
        this._y = this._y + (Stage.height / 2 - this._y) * 3.000000E-001;
    };
    bg._width = Stage.width;
    bg._height = Stage.height;
};
Stage.addListener(stageListener);
mainAnim._x = Stage.width / 2;
mainAnim._y = Stage.height / 2;
bg._width = Stage.width;
bg._height = Stage.height;
posted @ 2009-10-15 16:23  吹吹风----NICK  阅读(254)  评论(0编辑  收藏  举报