# Once again, im experimenting with random shapes and colors

**URL:** <https://forum.kirupa.com/t/once-again-im-experimenting-with-random-shapes-and-colors/183321>\
**Category:** Uncategorized\
**Created:** [March 25, 2006, 8:43pm UTC](https://forum.kirupa.com/t/once-again-im-experimenting-with-random-shapes-and-colors/183321 "2006-03-25T20:43:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mofongo9](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mofongo9](https://forum.kirupa.com/u/mofongo9)\
**Post date:** [March 25, 2006, 8:43pm UTC](https://forum.kirupa.com/t/once-again-im-experimenting-with-random-shapes-and-colors/183321/1 "2006-03-25T20:43:09Z")

</div>

heres a code i made

```auto

i = 0;
for (amount=random(100)+1; amount>0; amount--) {
    _root.createEmptyMovieClip("p"+i, i);
    _root["p"+i]._x = random(550)+10;
    _root["p"+i]._y = random(400)+10;
    i++;
}
_root.createEmptyMovieClip("l", i+2);
_root.createEmptyMovieClip("bg", i+1);
rggb1 = random(100);
rggb2 = random(100);
rggb3 = random(100);
rggb = "0x"+rggb1+rggb2+rggb3;
bg.lineStyle(1, 0x000000, 0);
bg.beginFill(rggb, random(100));
bg.lineTo(Stage.width, 0);
bg.lineTo(Stage.width, Stage.height);
bg.lineTo(0, Stage.height);
bg.lineTo(0, 0);
bg.endFill();
l.moveTo(p0._x, p0._y);
while (i>0) {
    thick = random(10)+1;
    b = random(2);
    alpha = random(40)+60;
    rgb1 = random(100);
    rgb2 = random(100);
    rgb3 = random(100);
    rgb = "0x"+rgb1+rgb2+rgb3;
    l.lineStyle(thick, rgb, alpha);
    if (b == 1) {
        l.beginFill(rgb, alpha-10);
    } else {
        l.endFill();
    }
    l.lineTo(_root["p"+i]._x, _root["p"+i]._y);
    i--;
}

```

generates random abstract thingy maboby i liked how it looked 🙂 some of you probably wont like it because its sorta stupid but i just like it cause it looks nice and i like basically everything made in purecode 😃

swf:
