adding a component which is a child of another component already will reparent the component(i.e change the parent of the child to the new canvas, cb in your case.). This is normal behavior. I am not sure why ca would return true but maybe cb is a child of ca? In this case, ca will return true because img1 is in the hierarchy of ca.
- venkat http://www.venkatj.com --- In [email protected], "Larry Zhang" <[EMAIL PROTECTED]> wrote: > > Hello all > > I find it strange when I try to add some display object in Flex > Canvas. This is the situation > > First, I have an Image named "img1" in a.mxml which is a Canvas; I > name it "ca". Then I send the img1 out by some function to another Canvas > b.mxml; I name it "cb". After I added the img1 to cb by cb.addChild(img1), I > found the image showed up in cb but disappeared in ca. Then I use > ca.contains(img1) to check if ca still has the img1, it returned true. But, > where the img1 in ca went? > > > > Can anybody help me with the strange problem? > > Thanks very much. > > > > > > ============================== > > Make Every Day Count > > > > Larry Zhang >

