Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Kenneth Kawamoto
Place outside of the function - private var eventList:Sprite; Kenneth Kawamoto http://www.materiaprima.co.uk/ Allandt Bik-Elliott (Receptacle) wrote: hmmm - i'm a little stuck on this i'm trying to create a pop-up (will tween but i want to get it working first) but i want it to kill any

Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Allandt Bik-Elliott (Receptacle)
that's actually helped me implement a movieActive variable so i've decided to go down that route instead - thanks for the input On 2 Apr 2008, at 16:35, Kenneth Kawamoto wrote: Place outside of the function - private var eventList:Sprite; Kenneth Kawamoto http://www.materiaprima.co.uk/

Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Allandt Bik-Elliott (Receptacle)
that said, i'd still like to know how to determine if a display object is in the current display list? thanks a On 2 Apr 2008, at 16:35, Kenneth Kawamoto wrote: Place outside of the function - private var eventList:Sprite; Kenneth Kawamoto http://www.materiaprima.co.uk/ Allandt

Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Jiri Heitlager
From the help files and modified a bit. It is probably more efficient to keep track of names and the do a getChildByName(string) function traceDisplayList(container:DisplayObjectContainer, DispObjToCheck:DisplayObject) : Boolean { var child:DisplayObject; for (var i:uint=0; i

Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Ketan Anjaria
displayObjectContainer.contains(child) On Wed, Apr 2, 2008 at 9:36 AM, Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] wrote: that said, i'd still like to know how to determine if a display object is in the current display list? thanks a On 2 Apr 2008, at 16:35, Kenneth Kawamoto

Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Steven Sacks
If the display object is checking itself, all you have to do is check to see if stage == null. Otherwise, you can see if its parent contains it. parentClip.contains(dispObj); that said, i'd still like to know how to determine if a display object is in the current display list?