开发者

Flash syntax problem

Quick question.

Trying to get error clip to play if email is not good, trying

if (trace(emailExpression.test(email.text))) 
{
    error_email.play();
}

but it's playing 开发者_如何学Pythoneven if email is right. any thoughts? I think its something with syntax!


trace() returns void whereas for an if() statement to function as expected you want to parse a value that equates either to true of false.

Maybe try ditching the trace() and see if that works - I'm not sure what test() does so I can't be certain.

if(emailExpression.test(email.text)) 
{
    error_email.play();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜