TEXT ENTRY QUESTION

Steps:

1. Open a new file
2. Draw a background
3. Type a topic question by using text tool-->choose as static text type
4. Named the layer as bg
5. Insert a  new layer-->named it as question
6. In this layer,use text tool-->type the question-->choose as static text type
7. Create a box  at the stage by using rectangle shape
8. Select text tool-->put the text above the box-->choose as input text type
9. Select text tool--->choose as dynamic text type (Below the box)
10. Insert new layer-->named it as button
11. In this layer,drag a play button from library panel to the stage-->resize as u want
12. Insert another new layer-->named it as stop
13. Right click at the first keyframe-->choose action-->Type this action script:

stop( );
var answer;
var respon;
answer = ""
respon = ""

14. Close action window
15. Select the button-->choose action-->Type this action script:

 on (release) { if (answer == "print client") {respon = "Your answer is correct!";

} else {

respon = "Sorry..Your answer "+ answer +" is wrong. Try again.";

}

}

on (release, keyPress "<Enter>") {

if (answer == "print client") {respon = "You're correct!";

} else {

respon = "Sorry..Your answer "+ answer +" is wrong. Try again.";

}

}

16. Close the window
17. In input text field,type answer for it variable
18. In dynamic text field,type respon for it variable
19. ctrl+enter to test the movie
20. Save the file
 
click on the image to see the exercise

0 comments:

Post a Comment

About