Displaying 1 result from an estimated 1 matches for "onbounce".
Did you mean:
announce
2006 Feb 28
3
EventPublisher (contribution)
.....
Object.extend(Object.extend(BouncingBall.prototype,
EventPublisher.prototype),
{
initialize: function(color)
{
this.color = color;
...other setup stuff and some code the makes the ball start
bouncing...
},
_bounce: function(howHigh)
{
//...fire the onBounce event with no arguments...
this.fireEvent( "onBounce" );
//...or fire it with some arguments...
this.fireEvent( "onBounce", {ball: this, howHigh: howHigh} );
...make the ball bounce here...
}
});
Then let''s say you have a clas...