# Basic Flash Game

**URL:** <https://forum.kirupa.com/t/basic-flash-game/185826>\
**Category:** flash\
**Created:** [April 16, 2006, 9:33pm UTC](https://forum.kirupa.com/t/basic-flash-game/185826 "2006-04-16T21:33:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fern](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@Fern](https://forum.kirupa.com/u/Fern)\
**Post date:** [April 16, 2006, 9:33pm UTC](https://forum.kirupa.com/t/basic-flash-game/185826/1 "2006-04-16T21:33:09Z")

</div>

Hey guys  
I am doing a basic drag and drop memory game. Basically you will see a combination of shapes for a few seconds then have to recreate that combination of shapes to move to the next level. I have the basic drag and drop script done, which looks like this for each object:

diamond.onPress = function() {  
this.startDrag();  
x\_pos = this.\_x;  
y\_pos = this.\_y;  
};  
diamond.onRelease = function() {  
stopDrag();  
if (this.\_droptarget == “/idiamond”) {  
} else {  
this.\_x = x\_pos;  
this.\_y = y\_pos;  
}  
};

Now the thing I am unsure about is the action scripting to track when they place an object in the wrong place, so that I can make it so they have only so many trys (I may decide to do this on a timer instead like most memory games). And tHen the action scripting to tell when everythings been placed correctly to move on to the next level (scene/frame). If anyone has any suggestions or can give me some ideas about how to go about doing these things that would be awesome. THanks

Edit: Ok I think I figured out what I need to know, ill use a counter function in the script so that when it reaches the right number it will go to the next level
