+ -
当前位置:首页 → 问答吧 → 求助怎么把这段火焰的代码背景色换成透明的

求助怎么把这段火焰的代码背景色换成透明的

时间:2010-10-14

来源:互联网

var mcs = createEmptyMovieClip("query", -1);
with (mcs)
{
    beginFill(0, 100);
    lineStyle(0, 0, 0);
    moveTo(0, 0);
    lineTo(Stage.width, 0);
    lineTo(Stage.width, Stage.height);
    lineTo(0, Stage.height);
    lineTo(0, 0);
    endFill();
} // End of with
var McR = 40;
var McA = 60;
var CreaMovie = this.createEmptyMovieClip("CreaMc", 0);
with (CreaMovie)
{
    fillType = "radial";
    colors = [16776960, 16776960];
    alphas = [McA, 0];
    ratios = [0, 255];
    matrix = new flash.geom.Matrix();
    matrix.createGradientBox(McR, McR, 0, 0, 0);
    beginGradientFill(fillType, colors, alphas, ratios, matrix);
    moveTo(0, 0);
    lineTo(0, McR);
    lineTo(McR, McR);
    lineTo(McR, 0);
    lineTo(0, 0);
    endFill();
} // End of with
CreaMovie._visible = false;
var McNum = 1;
var McMore = 200;
var McRandom = 6;
var McY = 4;
var Mc_x = Stage.width / 2;
var Mc_y = Stage.height / 2 + Stage.height / 4;
var Mc_more = 100;
var Mc_scal = 50;
flame = function ()
{
    var _loc3 = random(Mc_scal) + 1;
    var _loc2 = CreaMovie.duplicateMovieClip("flames" + McNum, McNum, {_x: Mc_x, _y: Mc_y, _alpha: Mc_more / 2, _xscale: _loc3 + 5, _yscale: _loc3 + 5});
    _loc2.blendMode = "add";
    _loc2.fast = Math.floor(_loc3 / 10);
    _loc2.action = random(2) == 1 ? (1) : (-1);
    _loc2.scal = 10 - _loc2.fast;
    _loc2.n = _loc2.s = 1;
    _loc2._r = _loc2._g = 255;
    _loc2._b = 0;
    _loc2.gs = (10 - _loc2.scal + 2) * 3;
    _loc2.onEnterFrame = function ()
    {
        this._x = this._x + this.fast * this.action * this.n * this.s;
        this._y = this._y - McY;
        this._xscale = this._xscale + this.scal * this.n * this.s;
        this._yscale = this._yscale + this.scal * this.n * this.s;
        this._alpha = this._alpha + 10 * this.n * this.s;
        this._g = this._g - this.gs;
        this._r = this._r - 2;
        if (this._g <= 0)
        {
            this._g = 0;
        } // end if
        new Color(this).setRGB(this._r << 16 | this._g << 8 | this._b);
        if (this._xscale >= Mc_more)
        {
            this.n = -1;
            this.s = 2.000000E-001;
        } // end if
        if (this._alpha >= Mc_more)
        {
            this._alpha = Mc_more;
        }
        else if (this._alpha <= random(20))
        {
            this.removeMovieClip();
            delete this.onEnterFrame();
        } // end else if
    };
    if (McNum >= McMore)
    {
        McNum = 0;
    } // end if
    ++McNum;
};
setInterval(flame, 10);

作者: www7740539   发布时间: 2010-10-14

版规中不推荐讨论与破解相关的话题
楼主的代码是破解的代码.

愿意参与讨论的朋友可能不多

作者: flash023   发布时间: 2010-10-14

热门下载

更多