[flexcoders] Re: Navigating to a new child in a ViewStack - how to target the child being hidden?
You probably want the hide event (Dispatched when an object's state changes from visible to invisible). --- In flexcoders@yahoogroups.com, lanekelly5 lkel...@... wrote: I'm putting together a prototype of an app and I have a ViewStack that is being controlled by a button toolbar. In each of these views there is a video player. What I need to do is to pause the video in the view that is being hidden. I see the change event triggered when I change views, but it seems that the target reference passed in via the event parameter is the new view. Is there an easy way to get a reference to the view being hidden? Or is there a different event triggered (something like a deactivate) that I can use to create a handler with a passed in reference to the departing view? Thanks.
[flexcoders] Re: Navigating to a new child in a ViewStack - how to target the child being hidden?
If you still want to use the change event (or if for some reason the hide event doesn't seem to work), I think you could also look at the oldIndex value of the event. From there you could call getChildByIndex on the ViewStack to get a reference. --- In flexcoders@yahoogroups.com, lanekelly5 lkel...@... wrote: I'm putting together a prototype of an app and I have a ViewStack that is being controlled by a button toolbar. In each of these views there is a video player. What I need to do is to pause the video in the view that is being hidden. I see the change event triggered when I change views, but it seems that the target reference passed in via the event parameter is the new view. Is there an easy way to get a reference to the view being hidden? Or is there a different event triggered (something like a deactivate) that I can use to create a handler with a passed in reference to the departing view? Thanks.