All pastes #518829 Raw Edit

Untitled

public text v1 · immutable
#518829 ·published 2007-05-29 13:01 UTC
rendered paste body
    function positionbits() {
        var _local2 = Stage.width * 0.5;
        var _local1 = Stage.height * 0.5;
        mainmovie._x = _local2;
        mainmovie._y = _local1 - 35;
        bottomright._x = Stage.width / 1.2;
        bottomright._y = Stage.height;
        colourbuts._x = Stage.width;
        colourbuts._y = Stage.height;
        botrighthill._x = Stage.width / 1.2;
        botrighthill._y = Stage.height;
        title1._x = Stage.width - 110;
        title1._y = Stage.height - 90;
        loads._x = (Stage.width / 2) - 90;
        loads._y = (Stage.height / 2) - 40;
        bottomleft._y = Stage.height;
        starfield._y = Stage.height / 2;
        blinkers._y = Stage.height / 2;
        backdrop._y = Stage.height;
        waves._y = Stage.height - 190;
        bot._y = Stage.height;
        content._y = Stage.height - 195;
        right._x = Stage.width;
    }
    fscommand ("fullscreen", "true");
    fscommand ("allowscale", "false");
    _root.descrip = "";
    _root.blue = 0;
    _root.arrows = "down";
    _root.original = "no";
    _root.vis == "on";
    _root.storm = false;
    positionbits();
    stageListener = new Object ();
    stageListener.onResize = function () {
    };
    Stage.addListener(stageListener);
    stageListener.onResize = function () {
        positionbits();
    };

    function setQuality(thisSpeed) {
        if (thisSpeed == 1) {
            total = 40;
            tcount = 40;
            fade = 12;
            spd = 50;
        } else if (thisSpeed == 2) {
            total = 70;
            tcount = 25;
            fade = 5;
            spd = 38;
        } else {
            total = 100;
            tcount = 15;
            fade = 3;
            spd = 30;
         }
    }
    function startUp(xPos, yPos, alpha, xTarget, yTarget, xConstant, yConstant, delay) {
        this.ele.attachMovie("probe", "obj" + item, depth++);
        var _local2 = this.ele["obj" + item];
        item++;
        _local2._x = xPos;
        _local2._y = yPos;
        _local2._alpha = alpha;
        _local2.d = depth;
        _local2.count = 0;
        _local2.xTarget = xTarget;
        _local2.yTarget = yTarget;
        _local2.xConstant = xConstant;
        _local2.yConstant = yConstant;
        _local2.delay = delay;
        _local2.rot = (Math.random() * 10) - 5;
        _local2._xscale = (Math.random() * 50) + 30;
        _local2._yscale = (Math.random() * 50) + 30;
        _local2.onEnterFrame = function () {
            var _local4 = this._x;
            var _local5 = this._y;
            var _local2 = _local4 + ((this.xTarget - _local4) / this.xConstant);
            var _local6 = _local5 + ((this.yTarget - _local5) / this.yConstant);
            if (_local6 > (bottom + 25)) {
                this.removeMovieClip();
            } else if (_local2 >= right) {
                _local2 = right - 0.5;
                this.bounce = true;
                this.xTarget = this.xTarget / 1.04;
            }
            this._x = _local2;
            this._y = _local6;
            this._rotation = this._rotation + this.rot;
            if (Math.abs(this._x - this.xTarget) < 60) {
                if ((this._currentframe == 1) && (this.trail == undefined)) {
                    this.play();
                    this.trail = true;
                    this.a = 10;
                }
                this.yTarget = this.yTarget * 1.011;
                if (this.bounce) {
                    this.xTarget = this.xTarget / 1.0002;
                } else {
                    this.xTarget = this.xTarget * 1.002;
                 }
            }
            if ((Math.abs(this._x - this.xTarget) < 15) && (Math.abs(this._y - this.yTarget) < 15)) {
                this.count++;
            }
            if (this.trail) {
                if (this.a >= 60) {
                    this.a = 60;
                } else {
                    this.a = this.a + 1;
                 }
                ele.createEmptyMovieClip("draw" + this.d, drawd++);
                if (drawd > 12000) {
                    drawd = 1000;
                }
                var _local3 = ele["draw" + this.d];
                _local3.lineStyle(0, 16776368, this.a);
                _local3.moveTo(_local4, _local5);
                _local3.lineTo(_local2, _local6);
                _local3.onEnterFrame = function () {
                    if (this._alpha < 0) {
                        this.clear();
                        this.removeMovieClip();
                    } else {
                        this._alpha = this._alpha - (fade / 4);
                     }
                };
            }
            this.d++;
            if (this.count > this.delay) {
                this._alpha = this._alpha - (fade / 30);
            }
        };
        depth++;
        if (depth > 998) {
            depth = 0;
        }
    }
    var left = this.frame_mc._x;
    var right = (left + this.frame_mc._width);
    var top = this.frame_mc._y;
    var bottom = (top + this.frame_mc._height);
    var total = 0;
    var tcount = 0;
    var depth = 0;
    var drawd = 1000;
    var fade = 0;
    var item = 0;
    var spd = 0;
    var num = 0;
    var numTotal = (Math.random() * 4);
    setQuality(_global.speed);
    var rx = 120;
    var ry = bottom;
    var startAng = 310;
    this.onEnterFrame = function () {
        num++;
        if (num > numTotal) {
            startUp((Math.random() * 35) + 100, bottom, (Math.random() * 30) + 70, (Math.random() * 200) + 520, (Math.random() * 50) + 80, (Math.random() * 4) + 8, (Math.random() * 2) + 4, (Math.random() * 6) + 17);
            num = 0;
            numTotal = Math.random() * spd;
        }
    };
    stop();