home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / cannonballfollier3.swf / scripts / DefineSprite_283 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  854 b   |  48 lines

  1. function mStart()
  2. {
  3.    play();
  4. }
  5. function mHit()
  6. {
  7.    _root.goGame.pbGreyBallActive = false;
  8.    _root.goGame.poBall.mHide();
  9.    this.piCount = this.piCount + 1;
  10. }
  11. function mRedHit()
  12. {
  13.    _parent.redball.mHide();
  14.    _root.goGame.pbRedBallActive = false;
  15.    this.piCount = this.piCount + 1;
  16. }
  17. function mDone()
  18. {
  19.    if(this.piCount == 2)
  20.    {
  21.       _root.goGame.mLevelComplete();
  22.    }
  23.    else if(_root.goGame.pbRedBallActive == false)
  24.    {
  25.       _root.goGame.mActivate();
  26.    }
  27. }
  28. function mRedDone()
  29. {
  30.    if(this.piCount == 2)
  31.    {
  32.       _root.goGame.mLevelComplete();
  33.    }
  34.    else if(_root.goGame.pbGreyBallActive == false)
  35.    {
  36.       _root.goGame.mActivate();
  37.    }
  38. }
  39. function mReset()
  40. {
  41.    piCount = 0;
  42.    _parent.redball.mReset();
  43.    targeta.gotoAndStop(1);
  44.    targetb.gotoAndStop(1);
  45. }
  46. piCount = 0;
  47. stop();
  48.