Quote Originally Posted by jerdb View Post
Now the problem with the coding: there's something wrong with counting the amount of pieces you have left.
Welkom op het forum jerdb.

Not much wrong with the counting. You set the clickable property of your tiles to false when they're created. Now this is your function to check if a piece should be placed on the tile:

Actionscript Code:
function getTarget() {
    naam = "t_"+game.ymouse+"_"+game.xmouse;
    if (game[naam].clickable and game[naam].speler == 0) {
        _root.tiles[naam].gotoAndStop(_root.huidigespeler+2);
        game[naam].speler = _root.huidigespeler;
        if(_root.huidigespeler==1) {
            _root.aantalblokjes1--;
        }else if(_root.huidigespeler==2){
            _root.aantalblokjes2--;
        }else if(_root.huidigespeler==3){
            _root.aantalblokjes3--;
        }else if(_root.huidigespeler==4){
            _root.aantalblokjes4--;
        }
        _root.wincheck(spelBord);
    } else if(game[naam].clickable) {
        _root.tiles[naam].gotoAndStop(2);
        game[naam].speler = 0;
        _root.wincheck(spelBord);
    }
}

Nothing will happen if (game[naam].clickable == false), which is the case with your code as it is. I changed the intial setting of the tiles.clickable to true and it seemed to work fine.