Hi all,
I was hoping that someone could give me some advice with a game I’ve been working on.
I have a drag and drop game where each movie clip is a word that the player has to arrange on screen in a certain order of importance - there is no snapping mechanism and the user can place the words anywhere desired.
Later in the game, I need this list of words to appear in the order that the player previously organized within a different scene.
I was wondering if anyone had the best solution for me to do this with my limited knowledge of Flash.
This is an example code of how I set up the drag and drop game:
//Array to hold all the puzzle movie clip instances.
var burgerArr:Array = new Array (burger_mc, burger2_mc, burger3_mc,
burger4_mc, burger5_mc, burger6_mc, burger7_mc);
//For loop to control the drag and drop of each burger by adding a
//mouse up and down to each movie clip.
for (var i:uint =0; i < burgerArr.length; i++) {
burgerArr*.addEventListener(MouseEvent.MOUSE_DOWN, drag);
burgerArr*.addEventListener(MouseEvent.MOUSE_UP, drop);
}
//This function drag the movie clips when the mouse is pressed.
function drag(event:MouseEvent):void {
event.currentTarget.startDrag();
}
//This function drop the movie clips when the mouse is released.
function drop(event:MouseEvent):void {
event.currentTarget.stopDrag();
}
Any suggestions would be greatly appreciated.
Thanks