PDA

View Full Version : Circle...thing



jerez_z
January 25th, 2006, 11:02 PM
Here... this isn't quite what I imagined, but I don't rememebr what I imagined. so here it is (11 lines):

_root.attachBitmap((all=new flash.display.BitmapData(550, 400, true)), 2);
s = {x:0, y:0};
onEnterFrame = function () {
r = {x:Math.round(_root._xmouse/10)*10, y:Math.round(_root._ymouse/10)*10};
if (r.x != s.x || r.y != s.y) {
for (var x = 0; x<20; x++) {
for (var y = 0; y<20; y++) {
t= {x:((x*10)+r.x)-((20*10)/2)-5, y:((y*10)+r.y)-((20*10)/2)-5};
(mat=new flash.geom.Matrix()).translate(t.x, t.y);
all.draw(new flash.display.BitmapData(10, 10, true, parseInt("0x"+Math.max((100-Math.floor(Math.sqrt((t.x-r.x)*(t.x-r.x)+(t.y-r.y)*(t.y-r.y)))), Math.random()*30)+"000000")), mat);
}
}
_root.s = {x: r.x, y: r.y};
}
all.draw(new flash.display.BitmapData(550, 400, true, 0x05FFFFFF));
};

hybrid101
January 26th, 2006, 12:06 AM
is it supposed to be pixelated?
oh, bitmapdata
looks kinda weird...i think the circles are too big. i think it would look cooler if it were smaller:thumb:

GNXDan
January 26th, 2006, 03:43 PM
it lagggs so much, none of the others do, try making it run faster and edit the size. You've done the hard part, keep it up!

Seb Hughes
January 26th, 2006, 04:13 PM
Its doesnt lag for me, its kinda wierd.