At 6/3/08 07:16 PM, Nuggs wrote:
At 6/3/08 06:02 PM, GuyWithHisComp wrote:
At 6/3/08 05:53 PM, Nuggs wrote:
This is the nesting the ifs is the fastest way to do it.
In what way is it faster?
Read this article
I just tested it out and it does make a small speed improvement.
But not for the reason they say.
Flash does not evaluate all expressions just because they are nested in the same statement.
Try
function a():Boolean
{
trace("a");
return false;
}
function b():Boolean
{
trace("b");
return true;
}
( a() && b() );
And you'll see only a() is evaluated because it returns false.