I have managed to embed a youtube video in Flash, using the YouTube ActionScript 3.0 Player API https://developers.google.com/youtube/flash_api_reference.
It's working fine but I need some additional functionality. I have multiple videos on a frame, so the first thing I want to do is
- If VIDEO 1 is playing and I click VIDEO 2, I want VIDEO 1 to stop.
- I want any video that is playing to stop when I leave the frame.
In regards to the latter, I'm aware I could create a button for navigation and add player.stopVideo(); function to it BUT it gets more complicated because the SWF is inside one of the (horrible) flipping book apps, so the navigation is controlled by the flipping book app, not the actual SWF that contains the videos.
Any workarounds for my 2 problems above?