In this week, mommy learned about Text Entry Question. Dr. Zaidatun already gave the task to do at home but we are not done it. So, Dr. Zaidatun asked us to do in class. After finished the task, Dr. Zaidatun teach us how to make a drag and drop game. Now, mommy will start with Text Entry Question first.
Class Activity 1 : Text Entry Question (Totally from Dr. Zaidatun's Note)
1. Create several layers as following and rename each of the layer with an appropriate name:
2. In layer bg, draw any object to acts a background of the application. For example, you can draw 3 rectangles to act as a background as followings:
3. In layer text1, type the following text:
4. In layer text2, type the following text:
5. In layer step, type the following text:
6. In layer question, type the question.
7. In layer button, drag two buttons from the Button Library as followings:
8. In layer stop, type the following action script:
var respon;
var answer;
respon = ""
answer = ""
stop();
9. Behind the Pause button, type the following action script:
on (release) { if (answer == "carbon monoxide and other hydrocarbons") { respon = "Correct!"; }
else { respon = "Incorrect! Your answer " + answer + " is incorrect"; } }
(In this picture, mommy already modified the action script)
10. Behind the Play button, type the following action script:
on (release) { gotoAndPlay ("Scene 2", 1);
11. Test the movie.
Class Activity 2 : Make A Drag And Drop Game With Responses
1. Choose a background color and draw a big rectangle. Then, draw 3 circles in difference color like blue, red and green. Then, rename the layer as a background.
(click the image above to view large image)
2. After that, lock the background by clicking on lock symbol.
3. Insert a layer and named it as answer. Type 3 text like "GREEN", "BLUE" and "RED". Then convert each text into symbol and choose Movie Clip behavior.
(click the image above to view large image)
4. Insert another layer and named it as response. Then, draw 3 small circles inside each big circles to make it as a target. Then, convert each small circles to symbol in Movie Clip behavior.
5. Then, right click at small circle and choose Edit in Place. Insert keyframe at Frame Number 2 and draw right symbol. After that, right click at the keyframe and choose Actions. Type stop(); at each keyframe. Then, click Scene 1 back.
(click the image above to view large image)
6. Right click on text symbol and choose Actions. Give an Instance Name for each big circles at Properties below the page. Then, put the actionscript as like below:
Put the instance name. This is important part of target.
You must change the instance name when put the action script on your answer.

X and Y need to change follow the target.
7. Test the movie
























0 comments:
Post a Comment