PDA

View Full Version : fish eyes


bodyvisual
01-21-2006, 05:34 AM
Stage.scaleMode = "noScale";
Stage.align = "lt";
var v:Object = new Object({ball_mc: _root.createEmptyMovieClip("ball_mc", 1), balls: new Array(_root.ball_mc), cols: new Array(0xFF0066, 0x00CCFF, 0xFF9900, 0xFFFF00), G: 0.8, F: 0.965, E: 0.80, T: Math.round(Stage.width/4)});
for (var i:Number = 0; i<v.T; i++) {
var mc:MovieClip = ball_mc.duplicateMovieClip("ball_mc"+i, _root.getNextHighestDepth());
mc._x = Math.round(Math.random()*Stage.width);
mc._y = Math.round(Math.random()*(-150-400))-150;
mc.lineStyle(10, v.cols[Math.round(Math.random()*(v.cols.length-1))], Math.round(Math.random()*(100-25))+25);
mc.moveTo(0, 0);
mc.lineTo(0, 1);
mc.sy = 0;
mc._intID = setInterval(mc, "_fn", 12);
mc._fn = _handle;
v.balls.push(mc);
}
function _handle():Void {
this.sy += v.G*v.F;
this._y += this.sy;
if (this._y>Stage.height-8) {
this._y = Stage.height-8;
this.sy = -this.sy*v.E;
}
}
onMouseDown = function():Void {
v.G = -0.2;
}
onMouseUp = function():Void {
v.G = 0.8;
}


:p:

bodyvisual
01-21-2006, 05:37 AM
oh gross, how slow it runs.

changed v.T to /10

three cheers for yucky browsers.

:p:

sed|thh
01-21-2006, 05:41 AM
nice effect!

it has a small bug, when you hold your mouse button down when the balls are still high, they fly up higher then they should

Seb Hughes
01-21-2006, 05:46 AM
Thats very nice :D

Sammo
01-21-2006, 05:17 PM
Reminds me of that advert (http://www.bravia-advert.com/commercial/braviacommhigh.html)

ElectricGrandpa
01-22-2006, 01:05 AM
Reminds me of that advert (http://www.bravia-advert.com/commercial/braviacommhigh.html)

Very true! (for those who don't know, check out http://www.bravia-advert.com/)

Sammo
01-23-2006, 03:50 PM
Very true! (for those who don't know, check out http://www.bravia-advert.com/)
Dude, it was linked :D

ElectricGrandpa
01-23-2006, 04:09 PM
Well if I couldn't see the link, I'm guessing other people couldn't either :) Stealth links = bad (http://www.useit.com/alertbox/980111.html).

jerez_z
01-23-2006, 09:04 PM
I don't understand what is going on

NiñoScript
01-24-2006, 12:43 AM
i just see some balls bouncing at the left half of the screen :puzzle: is that normal??