Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(this.hitTest(_root.ball1._x,_root.ball1._y,true)) {
- if(ballonme == 0){
- ballonme = 1;
- myRadians = Math.atan2(this._y-_root.ball1._y, this._x-_root.ball1._x);
- myDegrees = Math.round((myRadians*180/Math.PI));
- this._rotation = myDegrees;
- _root.ball1._x = _root.ball1._x-(Math.cos((Math.PI*myDegrees)/180) * (3));
- _root.ball1._y = _root.ball1._y-(Math.sin((Math.PI*myDegrees)/180) * (3));
- spacexB = -(Math.cos((Math.PI*myDegrees)/180) * dist)/2;
- spaceyB = -(Math.sin((Math.PI*myDegrees)/180) * dist)/2;
- bally=spaceyB-(spacey/ dddd2);
- ballx=spacexB-(spacex/ dddd2);
- randy = Math.floor(Math.random() * (3 - 0)) + 1;
- _root.sfx1.gotoAndPlay('wall' + randy);
- }
- }else{
- ballonme = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement