TwelvestoneFlash

maxH = maxH == 0 ? maxW : maxH;


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Big Ern
 
2010-11-23

Can someone please tell me what "maxH = maxH == 0 ? maxW : maxH;" means in AS3?

I don't understand this notation at all. If you could break it up into if else statements, that would help me out a lot. Thanks. k

DontBogartMe
 
2010-11-23

if it were written:

maxH = (maxH == 0 ? maxW : maxH);

would that help you understand it? It's the same, but a little easier to read I think.

In any case it means:

If maxH == 0 then maxH = maxW else maxH = maxH end if

DontBogartMe
 
2010-11-23

it's a ternary operator btw

Big Ern
 
2010-11-23

Ah! Thank you kindly.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

maxH = maxH == 0 ? maxW : maxH;