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

  1. function mStart()
  2. {
  3.    this.targeta.play();
  4. }
  5. function mHit()
  6. {
  7.    _root.goGame.poBall.mHide();
  8. }
  9. function mDone()
  10. {
  11.    _root.goGame.mLevelComplete();
  12. }
  13. function mReset()
  14. {
  15.    this.paHits = [0,0,0];
  16.    _parent.redballa.mReset();
  17.    _parent.redballb.mReset();
  18.    this.targeta.target.gotoAndStop(1);
  19.    this.targetb.gotoAndStop(1);
  20.    this.targetc.gotoAndStop(1);
  21. }
  22. function mCatch(liNum)
  23. {
  24.    this.paHits[liNum - 1] = 1;
  25.    var liCount = 0;
  26.    var i = 0;
  27.    while(i < this.paHits.length)
  28.    {
  29.       liCount += this.paHits[i];
  30.       i++;
  31.    }
  32.    if(liCount == 3)
  33.    {
  34.       this.mDone();
  35.    }
  36.    else if(liNum == 3)
  37.    {
  38.       _root.goGame.mActivate();
  39.    }
  40. }
  41. paHits = [0,0,0];
  42. stop();
  43.