开发者

Flash syntax problem

开发者 https://www.devze.com 2023-03-24 06:52 出处:网络
Quick question. Trying to get error clip to play if email is not good, trying if (trace(emailExpression.test(email.text)))

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

精彩评论

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