Need help with my game
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Need help with my game

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    1

    Need help with my game

    Hi, I'm making a little game for school. It's a drag- and drop game for little kids, it's the same concept as a puzzle game. The kids have to drag a figure into the tright contour and it 'clicks' into its place. I made 'targets' on my stage and buttons inside my figures, and when the targets hit the buttons (HitTest function), my figure goes to the right place. I hope it's a bit clear. This is my code for 1 puzzle piece (I changed the instance names to obvious names and to bold to make it easier for you):

    MYMOVIECLIP.onPress = function () {
    startDrag(this);
    }

    MYMOVIECLIP.onRelease = function () {
    stopDrag();
    }

    if (TARGET.hitTest(MYMOVIECLIP.BUTTONINSIDEMOVIECLIP)){

    MYMOVIECLIP._x=RIGHTPLACE;
    MYMOVIECLIP._y=RIGHTPLACE;

    }


    Anyways, the game works and all, but i'd like something to happen when all the pieces are in its place. A movieclip with a sound popping up would be cool, but I have no idea how to do it... Any suggestions? thanks!

  2. #2
    Junior Member jonathanlord31's Avatar
    Join Date
    Feb 2013
    Location
    India
    Posts
    3
    i thinks nice work but you have to increase difficulty level .........

  3. #3
    Senior Wabbit
    Join Date
    Jul 2008
    Location
    Winchester, Uk
    Posts
    215
    Heya sorry I not replied to your post sooner.
    Just been a little busy.

    Your method seems to mean you are manually setting each movieclip a drag function

    You want to use a loop.
    I have a bit of free time tonight so I will write a little something.

    Trust my code, and not my english.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com