ers@chattyfig.figleaf.com
Subject: [Flashcoders] understanding a simpe statement
Hello fellows.
I know it probably sounds dumb , but I'm having a hard time understanding
this statement
mc.scaleX < mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX
Hi,
They are both statements using the "ternary operator" - you had the
right idea in your prevouse email.
http://www.google.co.uk/search?hl=en&q=actionscript+ternary+operator&btnG=Google+Search&meta=&aq=0&oq=actionscript+tern
Basically it reads (If the condition before the qestion
: [Flashcoders] understanding a simpe statement 2
I would like to understand that one too:
maxH = maxH == 0 ? maxW : maxH;
Thanks!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Hello fellows.
I know it probably sounds dumb , but I'm having a hard time understanding
this statement
mc.scaleX < mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX = mc.scaleY;
Would that mean something like:
if (mc.scaleX < mc.scale){
mc.scaleY = mc.scaleX
} else if if (mc.scaleX > mc.scale
I would like to understand that one too:
maxH = maxH == 0 ? maxW : maxH;
Thanks!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Hi Isaac,
This will help you:
http://snipplr.com/view/15019/shorthand-code-for-assigning-a-value/
Cheers,
Sidney de Koning
On Jul 13, 2009, at 4:06 PM, Isaac Alves wrote:
I would like to understand that one too:
maxH = maxH == 0 ? maxW : maxH;
Thanks!
_
6 matches
Mail list logo