# Sequence of Expanding Circles

**URL:** <https://forum.kirupa.com/t/sequence-of-expanding-circles/207415>\
**Category:** flash\
**Created:** [November 17, 2006, 5:56am UTC](https://forum.kirupa.com/t/sequence-of-expanding-circles/207415 "2006-11-17T05:56:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [November 17, 2006, 5:56am UTC](https://forum.kirupa.com/t/sequence-of-expanding-circles/207415/1 "2006-11-17T05:56:42Z")

</div>

I’ve been messing with some code from [SIZE=-1][lionbichstudios.com](http://lionbichstudios.com). I’m looking for a way to have 5 circles appear in succession and expand and fade away. Works fine for one circle but I haven’t found a good way to create a sequence of circles. The one hitch: the code needs to appear all in one frame. (I’m using Flash MX 2004)

Here’s the basic code:

[/SIZE]

```auto
//Eliminates Stage.width bug
Stage.scaleMode = noScale;
var c:Number = 5;
this.createEmptyMovieClip("blank_mc", 1);
blank_mc.onEnterFrame = function() {
    //currx = _root._xmouse;
    currx = Stage.width/2;
    curry = Stage.height/2;
    trace(Stage.width/2);
    if (!(prevx == currx && prevy == curry)) {
        _root.attachMovie("mc", "mc"+c, c);
        with (_root["mc"+c]) {
            _x = currx;
            _y = curry;
            _width = 0;
            _height = 0;
        }
        this._parent["mc"+this._parent.c].onEnterFrame = function() {
            this.i++;
            this._width += 1.4;
            this._height += 1.4;
            this._alpha -= 100/60;
            if (this.i>=60) {
                //this.removeMovieClip();
            }
        };
        _root.c++;
    }
    prevx = currx;
    prevy = curry;
};

```
