3 Replies Latest reply on Jan 12, 2009 10:35 AM by clbeech


      HI there, kinda new to the whole actionscript. I am trying to make a jigsaw. i used fireworks to cut up a picture into pieces, imported them to flash8 and converted them to movie clips, I have done something similar in an on line tutorial called Zsorting. I figured this would be similar. But at the top of the cards that were being used there was a generic movie clip "menu_MC" so that was on all of them and that was included in the action script code.


      menuHeader_mc.onPress = function() { this._parent.swapDepths(_root.topDepth); ++_root.topDepth; this._parent.startDrag(false, 25, 25, 540, 390); this._parent.onMouseMove = function() { updateAfterEvent(); }; };

      The only way i can think of doing this now is to make an invisable box over each jigsaw piece and call it for exmple "menuHeader_mc".

      Can you please try and point me in the right direction.

      Regards Steve
        • 1. Re: Jigsaw
          clbeech Level 3
          well - this wont work for you I'm afraid :( the code above is simply for dragging an item 'above' other items in a linear manner. plus you will need to use some methods to determine if the 'piece' being moved is - a)in the correct place - b)snap it to a position when within range of the correct place - c)move freely when dragged - d)determine if the puzzle is complete - etc.

          it will take much more than this code. search the forums here and google - there are hundreds of puzzle tutorials and examples.
          • 2. Re: Jigsaw
            saheap1 Level 1
            I have had a look at a few tutorials now, All i want to really do it make the pieces moveable, i dont want a noise to play when they join or anything. or a start stop button.simply just make the jigsaw pieces dragable, what is the best way to go about that ?
            • 3. Re: Jigsaw
              clbeech Level 3
              you can use 'on' handlers and the startDrag() and stopDrag() methods. for each piece you will need to add something like this:

              piece1.onPress = function() {

              peice1.onRelease = function() {