Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Main Forums > Chill Out Room > Flash MX if statement syntax
  Last Thread   Next Thread
Share
Author
Thread    Post A Reply
Turbonium
Supreme tranceaddict



Registered: Jan 2003
Location: Toronto
Flash MX if statement syntax

In Java (where bla1 & bla2 are boolean):

if (bla1 == true && bla2 == false) {
}

How would you do that in flash? Most of it is the same I think, I just don't know about the "&&" part.

Old Post Aug-28-2004 20:37  Canada
Click Here to See the Profile for Turbonium Click here to Send Turbonium a Private Message Add Turbonium to your buddy list Report this Post Reply w/Quote Edit/Delete Message
igottaknow
PerfectTeeth R4 Dinosaurs



Registered: Feb 2001
Location: The Future

uses the same syntax as javascript and it should tell you how to contruct an if statement in the Help


___________________
GIGANTIC CUNT

Old Post Aug-28-2004 21:10 
Click Here to See the Profile for igottaknow Click here to Send igottaknow a Private Message Add igottaknow to your buddy list Report this Post Reply w/Quote Edit/Delete Message
AnotherWay83
The B00b Maintenance Guy™



Registered: Aug 2000
Location: land of d(-_-)b
Re: Flash MX if statement syntax

quote:
Originally posted by Turbonium
In Java (where bla1 & bla2 are boolean):

if (bla1 == true && bla2 == false) {
}

How would you do that in flash? Most of it is the same I think, I just don't know about the "&&" part.


i dont know abt flash MX but the last time i coded with actionscript was with flash 5, and if they havent changed the precedence rules then you will have to enforce it with parentheses, like so:

if ((bla1 == true) && (bla2 == false)) {
}

btw, your java code isn't optimal...if bla1 and bla2 are boolean, you might just as well drop the == part to get:

if (bla1 && bla2) {
}

i dunno if actionscript has a boolean data type or not

Old Post Aug-29-2004 00:40 
Click Here to See the Profile for AnotherWay83 Click here to Send AnotherWay83 a Private Message Add AnotherWay83 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
igottaknow
PerfectTeeth R4 Dinosaurs



Registered: Feb 2001
Location: The Future
Re: Re: Flash MX if statement syntax

quote:
Originally posted by AnotherWay83
i dont know abt flash MX but the last time i coded with actionscript was with flash 5, and if they havent changed the precedence rules then you will have to enforce it with parentheses, like so:

if ((bla1 == true) && (bla2 == false)) {
}

btw, your java code isn't optimal...if bla1 and bla2 are boolean, you might just as well drop the == part to get:

if (bla1 && bla2) {
}

i dunno if actionscript has a boolean data type or not

I haven't coded java in a couple of years but, i think ur mistaken, the correct syntax should have a not operator to flip bla2 to true

code:
if (bla1 && ! bla2){ }


___________________
GIGANTIC CUNT

Old Post Aug-29-2004 04:04 
Click Here to See the Profile for igottaknow Click here to Send igottaknow a Private Message Add igottaknow to your buddy list Report this Post Reply w/Quote Edit/Delete Message
AnotherWay83
The B00b Maintenance Guy™



Registered: Aug 2000
Location: land of d(-_-)b
Re: Re: Re: Flash MX if statement syntax

quote:
Originally posted by igottaknow
I haven't coded java in a couple of years but, i think ur mistaken, the correct syntax should have a not operator to flip bla2 to true
code:
if (bla1 && ! bla2){ }


oh yeah, you're right - i forgot that he wanted bla2 to be false...the code i showed is right if you want both bla1 and bla2 to be true...

Old Post Aug-29-2004 04:29 
Click Here to See the Profile for AnotherWay83 Click here to Send AnotherWay83 a Private Message Add AnotherWay83 to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Main Forums > Chill Out Room > Flash MX if statement syntax
Post New Thread    Post A Reply

 
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackOldie, kinda sounds like this one... [2007] [3]

Click here to listen to the sample!Pause playbackFafa Monteco Presents Kiko - Hitmaker [2004]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 17:19.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!