Using enterFrame is pretty expensive. I'd probably listen for SpriteC's move and resize events in the common canvas and position UIComponentB; based on the event.currentTarget.x and y coordinates. The events will have to be bubbled up from SpriteC to UIComponentA to the common canvas. Use localToGlobal to find the desired coordinates to position UIComponentB. You might experience a little lag; so the two may not look like they are connected though.
-TH --- In flexcoders@yahoogroups.com, Aaron Hardy <aaronius...@...> wrote: > > Hey flexers, > > I have Sprite C which is inside of Sprite B which is inside of Sprite A > which is inside of UIComponent A. UIComponent A and UIComponent B are > both children of a common Canvas. I need UIComponentB to always be > positioned over the top-left of Sprite C (so it appears to be stuck to > Sprite C). ALWAYS. So if Sprite C is scaled or moved, if Sprite B is > scaled or moved, if Sprite A is scaled or moved, if UIComponent A is > scaled or moved or ANYTHING happens that would affect Sprite C's > position, I need UIComponent B to always follow its position. Is there > a good way to do this? My first thought is to poll SpriteC's > coordinates on every enterFrame event, but it seems like it might be > overkill. Thoughts? > > Thanks! > > Aaron >