Displaying 1 result from an estimated 1 matches for "addball".
Did you mean:
oddball
2006 Feb 28
3
EventPublisher (contribution)
...on)...
Floor.prototype =
{
initialize: function(balls)
{
this.balls = [];
//if an initial balls collection was passed in, loop through it,
adding each ball separately in order to setup the event handlers...
if (balls)
$A(balls).each(function(b) { this.addBall(b); }.bind(this));
},
addBall: function(ball)
{
this.balls.push(ball);
// set up the event handler for this ball (synchronously, so no
3rd parameter)...
ball.attachEventHandler( "onBounce", this.ballBounce.bind(this)
);
// ...or set it...