consider flashes dictionary lookup time vs checking yourself.
this code that looks through all objects within a movieclip
and calls the function render() for each movieclip;
the code would cause flash to lookup the dictionary twice for each movieclip and once for other objects (the condition). i can code the same thing, omitting the check like this;Code:for (i in mc) { if (typeof(eval(i)) == "movieClip") mc[i].render(); }
this will have the same effect as the first code fragment however now there is only one dictionary lookup per object. when flash discovers that the object is not a movieclip, it just does nothing.Code:for (i in mc) mc[i].render();




Reply With Quote