Question
Controlling SWF loaded through MovieClipLoader
Hello AS gurus,
I have a two-level site for a portfolio where users can view still images and videos for different projects. The top level SWF file can be considered as the "parent SWF" and within this file, the user navigates by choosing which project he/she wants to explore. After choosing, the "parent SWF" loads in a "child SWF" via MovieClipLoader of the selected content. It is within this "child SWF" that the user can view the various images and videos (with sound) of the selected project. To go back out and choose a different project, the parent SWF is used and the user navigates to and chooses another project.
The problem is that I can't figure out how to communicate from the child SWF to the parent SWF (and vice versa)...well not really...this is difficult to explain...hmmm... It would be better to explain it with an example...
If you go to: http://www.culshaw.info/junk_drawer/xdin/swf/
(1) Choose the "Examples" square (when this box zooms up, you are presented with a way to navigate to various projects -- this SWF that loads as the zoom up happens is what I am calling the "parent SWF").
(2) Choose the second project, labelled "Ford : Ti-VCT" by clicking on it (after clicking on the Ford project, the "child SWF" is loaded via a MCL from the "parent SWF").
(3) You can see that the Ford project has 8 images and one video that the user can view. Choose the video and ensure that it begins to play and hit the mute button so that you hear sound (sound is default muted. It is within this "child SWF" that the video is NetStream(ed) and the sound is controlled. (there is a bug with my code here so you may need to hit play/pause to get the video going).
(4) Now, as the video is playing and you hear sound, click on the "Other Examples" button that is located below the video player. This button is actually embedded in the the "parent SWF" that allows the user to navigate back up to see other projects and not in the "child SWF" which contains all of the content. Notice that you continue to hear the sound and that the net connection is still streaming the video within the "child SWF". I don't want this to happen. I want the "parent SWF" to tell the "child SWF" to stop streaming and stop all sounds when this "parent SWF" - embedded "Other Examples" button is pushed.
I can't figure out how to do this. Any info that may help would be appreciated...
-john
I have a two-level site for a portfolio where users can view still images and videos for different projects. The top level SWF file can be considered as the "parent SWF" and within this file, the user navigates by choosing which project he/she wants to explore. After choosing, the "parent SWF" loads in a "child SWF" via MovieClipLoader of the selected content. It is within this "child SWF" that the user can view the various images and videos (with sound) of the selected project. To go back out and choose a different project, the parent SWF is used and the user navigates to and chooses another project.
The problem is that I can't figure out how to communicate from the child SWF to the parent SWF (and vice versa)...well not really...this is difficult to explain...hmmm... It would be better to explain it with an example...
If you go to: http://www.culshaw.info/junk_drawer/xdin/swf/
(1) Choose the "Examples" square (when this box zooms up, you are presented with a way to navigate to various projects -- this SWF that loads as the zoom up happens is what I am calling the "parent SWF").
(2) Choose the second project, labelled "Ford : Ti-VCT" by clicking on it (after clicking on the Ford project, the "child SWF" is loaded via a MCL from the "parent SWF").
(3) You can see that the Ford project has 8 images and one video that the user can view. Choose the video and ensure that it begins to play and hit the mute button so that you hear sound (sound is default muted. It is within this "child SWF" that the video is NetStream(ed) and the sound is controlled. (there is a bug with my code here so you may need to hit play/pause to get the video going).
(4) Now, as the video is playing and you hear sound, click on the "Other Examples" button that is located below the video player. This button is actually embedded in the the "parent SWF" that allows the user to navigate back up to see other projects and not in the "child SWF" which contains all of the content. Notice that you continue to hear the sound and that the net connection is still streaming the video within the "child SWF". I don't want this to happen. I want the "parent SWF" to tell the "child SWF" to stop streaming and stop all sounds when this "parent SWF" - embedded "Other Examples" button is pushed.
I can't figure out how to do this. Any info that may help would be appreciated...
-john
