Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

Re: removeChild doesn't kill the audio in external swf (as3)

Cow Forums : Adobe Flash
VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


Re: removeChild doesn't kill the audio in external swf (as3)
by Steve Parker on Apr 19, 2009 at 6:37:32 pm

Unfortunately I'm not in front of the project right now, but will be Monday. Before I waste any of your time I will double check that I was using the sound mixer code in the right spot as soon as I get a chance.

Trying to recreate this from memory so it might be a little off, but this is an abbreviated version of how my file is set up (didn't put my event listeners or anything but you get the idea...)


//create loader
var swfLoader:Loader = new Loader();
//url request for external swfs (i have one for each of my SWFs)
var section1SWFRequest:URLRequest = new URLRequest("section1.swf");
var section2SWFRequest:URLRequest = new URLRequest("section2.swf");

//when a section in the nav is clicked do this
function section1Clicked(event:MouseEvent):void
{
//i think this is where i tried tell all audio to stop
SoundMixer.stopAll();
//get rid of the old external swf
removeChild(swfLoader);
//load the new external swf
swfLoader.load(section1SWFRequest);
addChildAt(swfLoader, 0);
}


Hopefully the first time i tried that i just had the stopAll code in the wrong spot...we'll see what happens monday!


Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:


Related Tags:
DI



Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]