Re: [flexcoders] How to check if display object is visible to the user?

2010-06-29 Thread Oleg Sivokon
Something like:
root.getRect(stage).intersects(clip.getRect(stage)) && clip.visible &&
clip.alpha

I'm not sure about mask / clipRect / ColorMatrixFilter (they all may make
the clip appear as invisible) + of course, there may be another display
object on top of the clip, which you can roughly check by
getObjectsUnderPoint() providing all 4 points of the rectangle generated
from intersection of the clip and root rectangles, but this may not work
most of the time, if clips aren't rectangles by themselves / are rotated
etc...


[flexcoders] How to check if display object is visible to the user?

2010-06-29 Thread dorkie dork from dorktown
Let's say I have 10 images in a list. Only one is visible to the user.
If I have a fade in effect I want to add to that image on load
complete is there a way to see if the component is visible to the user
so then on those instances i'm not running the fade in effect?

JP