- Flash has type conversion for converting some types.
Some examples of this:
var i:int = NaN; trace (i);
Or:
var b:Boolean = null; trace(b);
Therefore, when you assign undefined to Object , the Flash instance converts it to null in the same way.
- Your comparison applies type conversion to incompatible types before evaluating
Boolean .
You can use strict comparison with false :
if(null === undefined) trace("Never traced: null is not the same as undefined!");
Constantiner
source share