![]() |
| Adobe Forums » Adobe Influences » Site Design » AS3 - stopping sound in externally loaded SWFs |
| Tags: |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi folks...I've spent hours trying to solve this; to no avail.
I've built a Flash movie that demos a new website. The Flash movie loads 14 external SWF files, each of which contains a single narration sound clip. I can get the external SWFs to load just fine, but when I load the next clip, the sound from the first clip keeps playing. I can use SoundMixer.stopAll();, but that has the unfortunate effect of also stopping my soundtrack, which plays in the main timeline of the container file. I've heard there is a way to stop sounds contained in external SWFs, something about NetStream, but haven't been able to get it to work. Complicating the matter: I can't edit the set of 14 external SWF files. Whatever solution I use must be implemented from the main container Flash file. Can anyone help me with this? Here's a sample of the code I use to load in each SWF: one_mc.addEventListener(MouseEvent.CLICK, go1); function go1(myevent:MouseEvent):void { myLoader.load(myRequest); myLoader.contentLoaderInfo.addEventListener(Event. OPEN,showPreloader); myLoader.contentLoaderInfo.addEventListener(Progre ssEvent.PROGRESS,showProgress) ; myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE,showContent); ** And here is the preloader code I use: function showPreloader(event:Event):void { addChild(myPreloader); myPreloader.x = stage.stageWidth/2; myPreloader.y = stage.stageHeight/2; ** function showProgress(event:ProgressEvent):void { var percentLoaded:Number = event.bytesLoaded/event.bytesTotal; myPreloader.loading_txt.text = "Loading - " + Math.round(percentLoaded * 100) + "%"; myPreloader.bar_mc.width = 198 * percentLoaded; ** function showContent(event:Event):void { removeChild(myPreloader); addChild(myLoader); myLoader.x = 20; myLoader.y = 155; ** Thanks!! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|