主题:  大家都来看一看!!

guofeng8210

职务:普通成员
等级:1
金币:0.0
发贴:3
#12003/1/30 23:14:30
请看这段代码:
on mouseUp
global user
global usernamelist
global passwordlist

set user = the text of field "name"
set usernumber = the text of field "number"

repeat with x = 1 to count(usernamelist)
if user=getAt(usernamelist,x) then
if usernumber=getAt(passwordlist,x) then
go to frame 5
end if
end if
end repeat
end
这是一个用来判断用户名和密码是否相符的代码,如果两者相符,影片就会跳到第5帧上,问:如果用户名和密码验证错误,影片跳转到第8帧,该段代码应如何编写。



oyp

职务:普通成员
等级:1
金币:0.0
发贴:79
#22003/2/2 20:02:52
在判断用户密码后加个else就可以吧,还有什么更好的方法吗?