To check if an object is empty or not

actionscript, actionscript-3, apache-flex, collections, flex3

Solution

If you mean if an Object has no properties:

var isEmpty:Boolean = true;
for (var n in obj) { isEmpty = false; break; }

Problem

I want to check in my function if a passed argument of type object is empty or not. Sometimes it is empty but still not null thus I can not rely on null condition. Is there some property like 'length'/'size' for flex objects which I can use here. Please help. Thanks in advance.

Original source