I have a little problem with counting all elements on stage. Flash, unfortunately is counting all objects on the stage without drawn objects (all shapes, including drawing objects, rectangles etc) all missed. Is there any way to count them?
Thanks in advance.
If you are referring to drawing primitives, such as lines and circles, then no, there is no way. You can only address and modify the container (Shape, Sprite, MovieClip, etc.), but once a primitive vector element is drawn, you lose any reference to it. You can only modify bitmap data.
You could, however create your own class and keep a counter for all those elements that the Flash Player doesn’t recognize – just increase the count whenever something is drawn and reset on
Graphics.clear().