Mommy's Greetings

"Welcome to Mommy's Life Journey As Master Student..."
Feeds RSS
Feeds RSS

Weekly Reflection 6: Text Entry Question, Make A Drag And Drop Game With Responses

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




Self Review 4: Multiple Question

Mommy create mommy's own Notes and Multiple Question. How mommy done it? You can see the .swf below:




Weekly Reflection 5: Make A Simple Interactive Environment With Buttons, Multiple Answer Question, Input Text

Today mommy learned about button and mouse up, over, down and hit. Then, Dr zaidatun continue with Multiple Answer Question (playing with action script) and Input Text (also playing with action script). Well, mommy will explained step by step.

Class Activity 1 : Make A Simple Interactive Environment With Buttons

1. Draw a farm and animals like sheeps, chickens, ducks, and horses. Then, convert all animals into symbol. How to convert? Go to Modify menu > Convert into Symbol... OR F8.

(Setting the Background size at the Properties width x height pixels)







2. Double click at Sheep's symbol. In here, mommy will explain a little bit of button states. There had four frames - one for each of the button states.

The states are:
UP - when the mouse isn't over the button
OVER - when your mouse is over the button
DOWN - when you click your mouse on the button
HIT - the active area that is the button - the region the user can hit or roll over.

Now, insert keyframe under the OVER button states. Then, type SHEEP with using Text Tool. Next, insert keyframe under the DOWN button states. Import to Stage the sound of sheep. After finished, click Scene 1. Repeat the same step to do at other buttons.






3. Test the movie by press Ctrl + Enter.







Class Activity 2 : Multiple Answer Question

1. Create a question and answer.

(click the image to view large image)

(click the picture to view large image)

2. Convert the answer A & B into symbol with press F8.




3. Insert layer STOP and type the action script stop();



4. Insert layer CORRECT and insert keyframe at Frame Number 5. Type the text for correct answer with using Text Tool. At keyframe Frame Number 5, type the action script stop();


(click the picture to view large image)


5. Next, insert layer INCORRECT and insert keyframe at Frame Number 10. Type the text for incorrect answer with using Text Tool. At keyframe Frame Number 10, type action script stop(); also.


(click the picture to view large image)


6. Then, type action script for button a & b.





7. Test the movie with press Ctrl + Enter.





Class Activity 3 : Input Text

1. Choose a background color. Then, type the text using Text Tool. Rename the layer with "question". By using Text Tool, drag and change to Input Text at Properties. Click at Show border around text. Name the Var: as "name". Uncheck at the Auto kern checkbox.





   
2. Insert a button. How to get from the libraries? Go to Window menu > Common Libraries > Buttons. Then, choose the button that you like. Drag the button to the stage. Right click at the button and choose Actions. Type the action script to run the button.




3.  Insert a layer stop. Right click and choose Actions. Write the action script for layer stop.

Var stands for variable. We put name as our variable just now.
name = "" means that name equal to any input that you wished. It doesn't assign to any value.

4. Insert a layer answer and insert keyframe at Frame Number 5. Then, type the text using Text Tool. Next, change it into Static Text. When you want to display the input variable, change it into Dynamic text. When you want to type the normal text, change it into Static Text. Can you understand?

Static Text = for the normal text that you always used.
Dynamic Text = for display or print the input variable or known as output.
Input Text = for input from the user.

Unclick the Show border around text. Put the variable as "name".









5. Right click keyframe at Frame Number 5 in layer answer and choose Actions. Put action script stop();


6. Test the movie by press Ctrl + Enter.





At last! Mommy done weekly reflection 5. one more to go...Fuhhh!