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();
}
精彩评论