巧用ActionScript语言制作单选题自动评分系统
2016-03-22李雪芹王智伟
李雪芹++王智伟
摘要:FLASH作为多媒体课件制作软件之一,其强大的交互功能是其他软件所无法比拟的,而交互功能的实现主要是通过按钮与其内嵌的ActionScript语言配合在一起来实现的。这篇文章主要讲述如何利用ActionScript语言中的条件语句制作多媒体课件的测评部分——单项选择题自动评分系统。采用按钮与ActionScript2.0中的条件语句相结合,实现对用户所选答案的显示及对错判断、得分,从而实现单项选择题的自动阅卷工作。
关键词:图形元件;按钮元件;IF条件语句;静态文本;动态文本的text属性
中图分类号:TP311 文献标识码:A 文章编号:1009-3044(2016)01-0090-04
Using the ActionScript Language Radio Grading System
LI Xue-qin, WANG Zhi-wei
(Xuchang Technical and Economic School, Changge 461500, China)
Abstract: FLASH as one of the multimedia courseware making software, its powerful interactive function is unmatched by other software, and the realization of the interactive function is realized mainly through the button and the embedded ActionScript language. This article mainly talks about how to make use of the conditional statements in the ActionScript language to make the evaluation of the multimedia courseware. The use of buttons and ActionScript2.0 in the combination of conditional statements, to achieve the user's answers to the display and the wrong judgments, score, so as to achieve the individual choice of the automatic scoring.
Key words: graphic element; button element; IF conditional statements; static text; text properties of dynamic text
ActionScript编程语言是Adobe公司专为FLASH设计的交互性脚本语言,是一种面向对象的编程语言。FLASH软件中按钮的主要作用是制作交互动画,但仅仅有按钮还不能控制动画的交互,必须与ActionScript编程语言中的语句配合才能实现交互动画的制作。下面我们就利用按钮与ActionScript2.0语言中的条件语句来制作单项选择题自动评分这一案例。
1 案例描述
用户在每道题的选项上单击,答案区域会显示所选答案的序号;单击“提交”按钮后,出现红色“改卷中,请稍等……”的提示,同时在对错区域显示所选答案的判断;之后在成绩区域显示所得分数。单击“重做”按钮后,界面重新初始化,答案显示区域清空,对错显示区域清空,成绩显示区域清空。
2案例展示
1)初始界面。如图1所示。
图1 初始界面
2)单击“提交”按钮后处于等待状态的界面。如图2所示。
图2 改卷等待界面
3)改卷后成绩出来时的界面。如图3所示。
