Groups | Blog | Home
all groups > flash actionscript > january 2006 >

flash actionscript : or statement?????


jonnybennett
1/1/2006 8:23:39 PM
I would like an action to take place if something or something or something is
present...
e.g. I have three text boxes... if any of these boxes are blank then go to a
new frame.

rather than writing it out three times like below, there must be a way of
writing 'or'

if (textA.htmlText='')
{gotoAndPlay('frameJames');}

if (textB.htmlText='')
{gotoAndPlay('frameJames');}

if (textC.htmlText='')
{gotoAndPlay('frameJames');}

anyone thanks.?
ElijahRock
1/1/2006 8:34:57 PM
hey jonnybennet. the answer to your question is simple... simply write it like
this:


if (textA.htmlText=' || textB.htmlText=' || textC.htmlText=')
{gotoAndPlay('frameJames');}

|| is the or operator in most C type languages.

Happy new year!

jonnybennett
1/1/2006 8:43:34 PM
AddThis Social Bookmark Button