所以我有一个使用Adobe导演制作的测验,但我正在为整体环境而苦苦挣扎。Adobe Director - Lingo测验
我加入以下的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值的特定自定义精灵。