Mommy's Greetings

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

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!

0 comments:

Post a Comment