Wednesday, 19 October 2011

(Drop and Drag - Game Test)

Hello again, I am back with some game testing:

Like the practice go’s in Flash, I think I’m ready start my game. But first, I need to make a basic bare-bones game. Let’s make a small menu:



















Here, I have opened Flash. Now I need to draw a simple square:
















This is basically going to be our Start button but for it to work, I need to convert it to a Symbol. Left-click and scroll down to Convert to Symbol. Give it a name (this will be saved in the Library) and make sure it’s a Button. You should have this pop-up:








Give it an Instance name:










And finally, some coding:











That is your start button but the coding is basically saying “that you are going into another frame when you click the button, so you need to add that frame. To do this, go into the Timeline and left-click in an empty frame and add a Blank Keyframe. You should have something like this:










This will give you a blank canvas to work with but you’ll still have your Menu. Now it’s time for my game. What I did first was create an empty Symbol (movie clip). Go to Insert > New Symbol:








You should have a “new” blank canvas. At this point, I imported some graphics. I did this by going to File > Import > Import to Library, and then I selected the sprites wanted in my game. Here’s what I have:
















Go back to Scene 1, and then go into your library and drag you symbol on to stage and then double click it so you are now inside it. I then converted these shapes into symbols (movie clips) and gave them Instance Names (The battery thing > Battery1 and the generator thing > Gen1) Then I added this coding into the ActionScript:















This coding means that I can pick up and drag the battery along and once it touches the generator, it will go to the next frame. In the second frame, it will have a an animated graphic in a Blank Keyframe:




















I positioned this so it is in the same place as the previous generator. I converted this into a Symbol, (movie clip) and then double-clicked it to go inside the symbol. I them finally added a tween. (the light above the generator)

That's about it for now. Until next time...

No comments:

Post a Comment