Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(this.hitTest(_root.ball1._x,_root.ball1._y,true)) {
  2.                 if(ballonme == 0){
  3.                     ballonme = 1;
  4.                     myRadians = Math.atan2(this._y-_root.ball1._y, this._x-_root.ball1._x);
  5.                     myDegrees = Math.round((myRadians*180/Math.PI));
  6.                     this._rotation = myDegrees;
  7.                         _root.ball1._x = _root.ball1._x-(Math.cos((Math.PI*myDegrees)/180) * (3));
  8.                         _root.ball1._y = _root.ball1._y-(Math.sin((Math.PI*myDegrees)/180) * (3));
  9.                         spacexB = -(Math.cos((Math.PI*myDegrees)/180) * dist)/2;
  10.                         spaceyB = -(Math.sin((Math.PI*myDegrees)/180) * dist)/2;
  11.                     bally=spaceyB-(spacey/ dddd2);
  12.                     ballx=spacexB-(spacex/ dddd2);
  13.                     randy = Math.floor(Math.random() * (3 -  0)) + 1;
  14.                     _root.sfx1.gotoAndPlay('wall' + randy);
  15.                 }
  16.             }else{
  17.                 ballonme = 0;
  18.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement