-
advanced if statements?
I am trying to find out if there is a way that I can run an if statement like this:
if(a == (1,4,6,8)){
//do something
}
instead of doing something like this:
if(a == 1 or a == 4 or a == 6 or a == 8)){
//do something
}
edit:
Actually, something like this would be even better:
if((a == (1,4,6,8)) and (b == (1,4,6,8))){
//do something
}
Thanks
Last edited by Ojos Azul; 05-16-2005 at 11:53 PM.
-
U can use switch case in this case,eg.,
Code:
switch(a)
{
case 1:
case 2:
case 3:
case 4:
trace("voila");
break;
}
Hope this'll help.
Flash makes the Web go Round
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|