all groups > flash (macromedia) > march 2006 >
You're in the

flash (macromedia)

group:

"If" statement syntax question...


Re: "If" statement syntax question... David Stiller
3/8/2006 3:42:11 PM
flash (macromedia):
DIY_Lobotomy,

[quoted text, click to view]

ActionScript is the same as many, many other languages in this regard.
Take each condition and use the logical AND and/or logical OR operators.

if (condition1 && condition2 || condition3) {
// do this
}


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

"If" statement syntax question... DIY_Lobotomy
3/8/2006 8:36:01 PM
I know that there's a way to put multiple conditions in an "if" statement, but
I can't figure it out...

...for instance, how would I write out the statement:

if x > y AND if a < b

Or, consequently, how would I write out:

if x > y OR if a < b

I tried this, but it doesn't work:

if(x>y, a<b) {
....
}

Thanks...

Re: "If" statement syntax question... DIY_Lobotomy
3/8/2006 9:21:38 PM
I told you it was easy - thanks!!!

;)

--Matt
AddThis Social Bookmark Button