Interaction
The method is simple, the making step is cumbersome, the practicability is comparatively strong.
First look at the effect:
Click here to download the source file (decompression password: www.webjx.com)
1. Create a new document and select a background:
2, and then enter the title:
3, lock the layer, add a new layer. Then enter questions and various answers:
4, and then add another layer:
5, select 2-5 frames, add key frames respectively. Change the question and answer on 2, 3, 4 frames. Turn all the answers on the questions layer into button components:
6. Add As for each button:
On (release) {
gotoAndPlay ("02");
}
Correct answer button to write code:
On (release) {
gotoAndPlay ("02");
score++;
}
7, in the action layer is named frame, the 1th frame is 01, the 2nd frame is 02. .......
8, in the questions layer 5th frame Delete all questions and answers, then enter the content:
9, enter the dynamic text "100" near "correct answers". The same method sets the score.
10, in the action layer to add Action instructions: Stop (); Add the following code to frame 1th of the question layer, and then add a stop () to the 2nd, 3, and 4 frames.
11. Add the Last frame:
Stop ();
percent=score/4*100 + "%";
if (score = = 0) {
Resultat = "-Have you ever seen Simpsons?"
}
if (score = = 1) {
Resultat = "-To Bad:("
}
if (score = = 2) {
Resultat = "-Can Do It better"
}
if (score = = 3) {
Resultat = "-OK"
}
if (score = = 4) {
Resultat = "-Excellent:)"
}
Press Ctrl+enter to test it!