10 Replies Latest reply on Mar 29, 2012 6:58 AM by kglad

    Multiple Drag and Drop, multiple targets. CS5

    Gladiatorus

      Hello:

       

      I'm making a Multiple Drag and Drop in Multiple Targets educational puzzle for 6-7 y/o kids that tries to teach them a bit about which plants grow in which environments in the country. So, I have a map of Mexico divided in 3 diferent zones: desert, forest and tropic, and 6 different plants (of 3 different groups: cacti, pines and tropical flowers, 2 of each) scattered across the stage and around the map. The goal is for the kids to drop the plants in the right zone and then to click a "verify" button that triggers a validation process. Each of the plant's movie clip has 2 frames with a stop(); action on each: the plant graphic spans across both frames and the second frame has a red error sign over the graphic that indicates an error has occured (if that's the case). Then the validation process triggered by the "verify" button is supposed to move the playhead of each wrongly placed plant move clip to the second frame to show which plants are misplaced and move the main timeline's playhead to a frame that contains a "Please try again" text and a "Restart Puzzle" button. If all the answers are right, an animation plays saying that it was VERY WELL DONE! .

       

      I searched the internet for some tutorials and found a file that is pretty close to what I need. I've tried to adapt the code to my puzzle but have failed miserably. The file is here if you want to check it out (scroll to the bottom of the page, it's called Soldier.fla). I'm not pasting the code here because it's VERY long, but I will if required. If you want me to upload the files somewhere else and link them here, I will. If you need me to send them to you I'll be glad.

       

      Here's the structure and instance names in my file:

       

      Start:

      - Intro animation

       

      Map:

      - 3 movie clips: target_1, target_2 and target_3.

      - Each movie clip has two frames with a stop(); action on each.

      - Each movie clip has a graphic per frame with a change of color to show when a plant movie clip has been dropped on it.

       

      Plants:

      - 6 movie clips: drag_1, drag_2, drag_3, drag_4, drag_5 and drag_6.

      - Each movie clip has two frames with a stop(); action on each.

      - Each movie clip has an invisible button in its bottom layer called dragbutton1 to dragbutton6 respectively.

      - In the second frame of each movie clip I placed an error sign  to show when the kid has dropped the movie clip in the wrong taget.

       

      Placement:

      - drag_1 and drag_3 movie clips must be dropped into target_1.

      - drag_2 and drag_4 movie clips must be dropped into target_2.

      - drag_5 and drag_6 movie clips must be dropped into target_3.

       

      Buttons:

      - Start Puzzle button: Moves main playhead to a frame named "play". It shows after the Intro animation has stopped.

      - Verify button: Validation process. If there's any errors sends the main playhead to a frame named "bad" (here's the "Please try again" text). If there's no errors, sends the main playhead to a frame named "good" where the "Very Well Done" animation starts. It shows when the puzzle starts.

      - Restart Puzzle button: Moves main playhead to the "Play" frame. It shows when the puzzle starts.

      - Start button: Restarts everything. It shows after the "Very Well Done" animation.

       

      Phew, that was long!

       

      Now, I'm not a programmer, I'm a designer. I can make buttons and other very simplistic little things but this is just out of my league. The programmers at my office do things like PHP (Wordpress, Joomla), some JS and things like that but they don't do any ActionScript. They tried to help but dropped the ball and I've been trying to figure this out since Friday (I took this as a challenge, and lost it). The client wants it in AS2 but if you can help me in AS3, screw the client!

       

      If any of you guys can help me with the code or point me to the right place, I'll be in debt with you. Eternally.

       

      Thank you very much.