-
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!
-
Junior Member
i thinks nice work but you have to increase difficulty level .........
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|