home *** CD-ROM | disk | FTP | other *** search
- stop();
- this.onRelease = function()
- {
- SqXPos = Math.round((this._y - 50) / 40 + 1);
- SqYPos = Math.round((this._x - 50) / 40 + 1);
- piecex = _root.matPosP[_root.activePiece[1]][_root.activePiece[2]];
- xStart = _root.activePiece[1];
- yStart = _root.activePiece[2];
- if(_root.activePiece[1] != null)
- {
- if(_root.validMove(_root.activePiece[1],_root.activePiece[2],SqXPos,SqYPos))
- {
- valxxx = _root.playerMoveValue(xStart,yStart);
- _root.movePiece(_root.activePiece[1],_root.activePiece[2],this._x,this._y);
- if(_root.playerMoveValue(SqXPos,SqYPos) == 4 && valxxx == 4)
- {
- _root["p" + piecex]._alpha = 70;
- _root.activePiece[1] = SqXPos;
- _root.activePiece[2] = SqYPos;
- _root.kxxxx = 1;
- }
- else
- {
- if(verifOverComp() == 1)
- {
- _root.gOver.play();
- _root.gOver.msg.text = "You win!";
- }
- if(verifOverPlayer() == 1)
- {
- _root.gOver.play();
- _root.gOver.msg.text = "You lose!";
- }
- _root.kxxxx = 0;
- _root.computerMove();
- }
- }
- }
- };
-