【发布时间】:2013-03-08 02:25:28
【问题描述】:
所以我正在使用 Adobe Director 进行测验,但我在整体环境中遇到了困难。
我将以下 Lingo 脚本添加到每个按钮,并提供正确答案:
on mouseDown
global gscore
set gscore = gscore + 1
在最后阶段,我使用以下 Lingo 脚本来检查获得的点,并为结果显示适当的精灵。
on enterFrame
if gscore = 0 then set the memberNum of sprite (3) to 154
end if
if gscore = 1 then set the memberNum of sprite (3) to 155
end if
if gscore = 2 then set the memberNum of sprite (3) to 156
end if
if gscore = 3 then set the memberNum of sprite (3) to 157
end if
if gscore = 4 then set the memberNum of sprite (3) to 158
end if
if gscore = 5 then set the memberNum of sprite (3) to 159
end if
end
所以我的错误似乎是说没有声明变量,但它是全局的,对吗?那怎么就认不出来了。第一个脚本附加到与正确答案对应的按钮上,每个按钮都有一个单独的脚本将其发送到下一个问题。用于显示结果的最后阶段应该根据 gscore 的值显示某个自定义精灵。
【问题讨论】:
标签: lingo adobe-director