Instance of Symbol 3 MovieClip "ball" in Frame 1
onClipEvent (load) {
velocity = 5;
xvel = 10;
radius = this._width / 2;
gs = -2;
}
onClipEvent (enterFrame) {
radius = this._width / 2;
if ((this._y + velocity) > (400 - radius)) {
this._y = (400 - radius) - ((this._y + this.velocity) - (400 - radius));
this.velocity = this.velocity * -1;
} else if ((this._y + velocity) < radius) {
this._y = radius + (radius - (this._y + this.velocity));
this.velocity = this.velocity * -1;
} else {
this._y = this._y + this.velocity;
}
if (((this._x + xvel) > (550 - radius)) || ((this._x + xvel) < radius)) {
this.xvel = (xvel + random(5)) * -1;
} else {
this._x = this._x + this.xvel;
}
if ((this._y > 150) && (this._y < 250)) {
if ((radius < 150) && (radius > 2)) {
this._width = this._width + gs;
this._height = this._height + gs;
radius = this._width / 2;
} else {
gs = gs * -1;
this._width = this._width + gs;
this._height = this._height + gs;
radius = this._width / 2;
}
}
}
Instance of Symbol 4 MovieClip in Frame 1
onClipEvent (enterFrame) {
this._y = _root.ball._y;
if (this.hitTest(_root.ball)) {
_root.ball.xvel = -1 * Math.abs(_root.ball.xvel);
}
}
Instance of Symbol 5 MovieClip in Frame 1
onClipEvent (enterFrame) {
this._y = _root._ymouse;
if (this.hitTest(_root.ball)) {
_root.ball.xvel = Math.abs(_root.ball.xvel);
}
}
Symbol 9 Button
on (release) {
getURL ("http://www.chickensnack.com/", "_blank");
}