Not good at programming for the subject teachers, the use of Flash MX components provided, without complex programming, you can easily create a strong interactive courseware. This paper presents a Quiz Flash MX components production methods, and to share.
The courseware just to hint, and only part of the design of the test questions. Run effect is: There are several multiple-choice questions on each page, finished the first page, it can flip to the second page of the issue to continue to do, and finally, click the "test" button, there may be test feedback.
Production process:
Importation of questions
1, start Flash MX, double-click "Layer 1" name, and renamed the "questions" and then select the Text tool (A), type the questions in the work area contents. Enter the results shown in Figure 1.
2, the second frame in the Timeline, insert a blank keyframe, select the Text tool is still (A), in the work area and then enter the second page of the contents of examination papers. (In this case a total of three items).
Second, production options
3, the first frame selected, choose "Window / Components" or CTRL + F7 to open the window components. Select "RadioButton" component onto the scene, and change its properties: the Lable Set A, GroupName set question1, the rest choose the default option. The first problem with the law may make the other three options, just Lable were set to "B", "C", "D"; GroupName is set to question1.
4, with step 3, can make the second question, the third title of the option. Only the second title in the options GroupName to question2; the third title in the options GroupName to question3.
5, select the second frame, drag the window from the component "Push Button" button to the scene of the appropriate location. And change its properties: the Lable set to "test"; Click Hander set to "nclick", "instance name" set to "jc" the rest choose the default choices.
Third, making navigation buttons
6, select "Window / Public Library / button" button to open the public library, click the "circle button", the "circle button-next" button in the first frame onto the appropriate location. The "circle button-previous", "circle button-stop" button onto the appropriate place in the second frame.
7, in scene selection "circle button-previous" button, then select "Window / action" command, open the Action dialog box, set the button action, behavior code:
on (release) (gotoAndPlay (1))
8, with step 6, can be set to "circle button-stop" button on the action, their behavior code:
on (release) (fscommand ("quit ");}; first frame of the" circle button-next "button in the behavior of code: on (release) (gotoAndPlay (2)).
9, select "Test" the first frame layer, then select "Window / action" command, open the Action dialog box, set the frame for action, behavior code: stop (), as the second frame code of conduct also stop ().
4, show the results produced
10, selected "problem" the second frame layer, select the Text tool (A), at the scene pulled out a text box. And change its properties: the type is set to "dynamic text", the instance name to "result". Mainly used for the text box to display the final result.
5, increase the action layer
11, insert a new layer and name it "actions" and then select "Actions" layer first frame, then select "Window / action" command, open the Action dialog box, the frame for action set, conduct code:
/ / Set:
right = 0 / / number of items answered correctly with the right record,
score = 0 / / score recording the final score
wrong = 0 / / wrong number of records got the wrong answer question,
n = 5 / / n points for each question
/ / On the "test" button with a function set.
function nclick () (/ / when click the test button, the action
/ / The third question right or wrong to judge the situation
result3 = _root.question3.getValue (); / / get the results of your choice
if (result3 == "C") (/ / set to C for the correct answer
right = right +1
)
if (result3 == "A" | | result3 == "B" | | result3 == "D") (/ / set to A, B, D for the wrong answers
wrong = wrong +1
)
/ / Score feedback
score = right * n
result.text = "you do on the" + right + "title;" + "wrong" + wrong + "title;" + "He got" + score + " points "
jc.setEnabled (false); / / to "test" button failure
)
12, above 11 steps, not on the first frame of the two questions to judge, because in FLASH, when the frame jump, the components of value is not memory, so for the first two frames on the theme judge, with the first frame of the "circle button-next" navigation button to complete.
6, change the button action
13, select the "problem" in the first frame layer "circle button-next" button, then select "Window / action" command, open the Action dialog box, the code of conduct to increase to:
on (release) (/ / click on the button when the action
/ / Determine the first question right or wrong situation
result1 = _root.question1.getValue ();
if (result1 == "B") (/ / set the right answer the first question for the B
right = right +1
)
if (result1 == "A" | | result1 == "C" | | result1 == "D") (/ / set an error the first question the answer to A, C, D
wrong = wrong +1
)
/ / Determine the second question right or wrong situation
result2 = _root.question2.getValue ();
if (result2 == "A") (/ / set the correct answer to the second question A
right = right +1
)
if (result2 == "B" | | result2 == "C" | | result2 == "D") (/ / set the wrong answer to the second question B, C, D
wrong = wrong +1
)
gotoAndPlay (2); / / Click the jump to the second time
)
7, view results
14, select "Control / Test Movie" command, to see the effect.
15, and finally through the "file / release" command can be issued for the executable file.
8, in particular on
銆??1銆侀?杩囧鍚戝悗缈婚〉鎸夐挳鐨勬敼杩涳紝鍙互缁熻鏈〉棰樼洰姝h鎯呭喌锛岃В鍐充簡褰撳抚璺宠浆鏃讹紝FLASH缁勪欢鐨勫?涓㈠け鐨勯棶棰樸?
2, the action set in motion in the layer jc.setEnabled (false) statement is: When you press the test button to test button and loss of function, to avoid duplication of points.
3, testing is complete, to return to the home page, re-start the test, then re-score.
相关链接:
YUV format
Vertical Market Apps comments
WondSoft Video Converter
Delicacy iPod to COMPUTER Transfer
Calculators And Converters Comments
1.0 RING Tone Maker Factory
Lohan DVD to WMV
Ts Files
"Happy the Man" fax replacement, enable EastFax
Youtube FLV to PSP Professional
Daniusoft DVD to PS3 Converter
how TO convert flac to mp3
Mov To Avi Converter
Super DVD Creator
New Text Or Document Editors