PDA

View Full Version : square shower..


nathan99
01-16-2006, 12:14 AM
My second entry..


l = f=0;
function create(x, y, w, h, c) {
var k = _root.createEmptyMovieClip("square"+[++l], l);
k.beginFill(c);
k.moveTo(-(w/2), -(h/2));
k.lineTo(-(w/2), -(h/2));
k.lineTo(-(w/2), h/2);
k.lineTo(w/2, h/2);
k.lineTo(w/2, -(h/2));
k._y = x;
k._x = y;
}
setInterval(function () {
for (var i = 0; i<2; i++) {
square1.duplicateMovieClip("nesq"+[++f], getNextHighestDepth(), {_x:square1._x+random(10), _rotation:random(360), dir:random(2), _alpha:random(50)+50, xsp:Math.random()*5, ysp:-Math.random()*20-10, onEnterFrame:function () {
this.dir == 1 ? this._x -= this.xsp : this._x += this.xsp;
this._y>Stage.height ? this.removeMovieClip() : this._y += this.ysp;
!this.hitTest(square2) && !this.hitTest(square3) ? this.ysp++ : null;
while (this.hitTest(square2) || this.hitTest(square3)) {
this._y--;
}
}});
}
}, 10);
create(Stage.height, Stage.width/2, 4, 4, "0xEE0000");
create(Stage.height/1.4, 350, 60, 20, "0x000000");
create(Stage.height/1.4, 175, 60, 20, "0x000000");

jerez_z
01-16-2006, 12:50 AM
very nice

Barcadia
01-16-2006, 04:24 AM
its very square

nathan99
01-16-2006, 07:00 AM
its very square

hence the title.

Seb Hughes
01-16-2006, 10:56 AM
Wow that is very swanky indeed :D

great
01-17-2008, 10:05 AM
Great one. I like it.

npgames
01-22-2008, 10:52 PM
spam?

Templarian
01-24-2008, 09:49 PM
Yes... lets bann nick p. for spamming.

npgames
01-24-2008, 11:08 PM
hahaha, lets not, i got bored of the Banned title, too many people thought i was realy banned, and besides id never get my server up if i was banned

alexgeek
01-25-2008, 03:47 PM
That's awesome!

biznuge
01-28-2008, 08:23 AM
think the pellets that hit the little shelves need to have their vertical speed reset once they hit that thing, as they seem to fly off the end at too high a speed...

Nice though.