0 Replies Latest reply on May 17, 2006 4:46 AM by _EnergiE_

    Domino Game

    _EnergiE_
      Hi

      I have a really wicked domino game to make and I'm completely confused. Has anybody seen a tutorial on the web??

      Thanks!

      So, What I have to do for now is place all the domino bones according to some layout: first they move from left to righ horizontally, reaching the end of the table they should begin moving downwards vertically. Here's some code I used for this, but it's not working correctly:
      var tableWidth:Number = 688;
      var tableHeight:Number = 416;
      var startX:Number = 382;
      var startY:Number = 231;
      var i:Number = 0;
      startGame_mc.onRelease = function() {
      ++i;
      chipName = "newChip_mc"+i;
      duplicateMovieClip("chip1_1", chipName, _root.getNextHighestDepth());
      setProperty(chipName, _x, startX);
      setProperty(chipName, _y, startY);
      startX += 36;
      startY = startY;
      trace(startX);
      trace(startY);
      if (startX>=709) {
      startY = 249;
      setProperty(chipName, _rotation, 90);
      setProperty(chipName, _y, startY);
      startY += 36;
      return startY;
      startX = 709;
      return startX;
      setProperty(chipName, _x, startX);
      }
      };
      Each bone is wide 36 px and 18 px high.
      The table is 688 by 416 px and the stage is 800x520 px
      The first bone is in the center at x:382 and y:231
      I'm thinking of writing a class for the bones but I'm not really skilled at writing classes..., so... some suggestions ??