Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7067951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:15:49+00:00 2026-05-28T05:15:49+00:00

I have created a flash player that loads external swfs and control them through

  • 0

I have created a flash player that loads external swfs and control them through stop, play, frwd buttons. the external swf is added on next previous buttons click using loader class.

to remove the preiously added SWF and add new one I use the following code

l.unloadAndStop();

l.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);

l.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadHandler);

l.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, loadError);

var Request:URLRequest =  new URLRequest(xmlData.Page[Current_Page_No].URL[0]);

l = new Loader();

l.load(Request);

l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,     loadProgress,false,0,true);

l.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler,false,0,true);

l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);

every thing works fine as loading complete before I click the next button, I face an issue when I click next quickly before loading the previous content completed.
the loader seems to continue loading the previous content and add its sound to stage, the sounds don’t seem to stop even though its not within the current SWF. I can’t simply stop all sounds because I’ll have other SWFs with sound. and nothing seems to work with sound stream even unloadAndStop please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:15:50+00:00Added an answer on May 28, 2026 at 5:15 am

    The Problem is Fixed for now

    here is what I used to remove the old externally loaded SWF

    //stop all sounds
    SoundMixer.stopAll();
    
    System.gc();//force Grabage collection (might not work)
    
    while (Container.numChildren > 0){ Container.removeChildAt(0); }//remove from stage
    
    try
    {
    
    currentSWF.stop();//Stop the Loaded Movie clip copy
    
    while (currentSWF.numChildren > 0){ currentSWF.removeChildAt(0); }//remove all children
    
    currentSWF = null;//null its reference
    
    }
    
    catch(er:*)
    {
    trace("MC null");
    }
    
    l.unloadAndStop(true);//unload the loader
    
    l.unload();
    
    // remove event listeners
    l.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
    
    l.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadHandler);
    
    l.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
    

    but mostly what helped was SoundMixer.stopAll() and having a stop at the end of the

    externally loaded SWF with Audio. Hope this works for others

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Flash. I have created a flv player that can play videos
I have created a small flash CS4 project that has a few custom components
I have created a few small flash widgets that stream .mp3 audio from an
I have made an actionscript that loads an external text file, and scrolls its
I have created a simple audio player to play continuously even if the page
I have created a FLV video player using the AS3 flash.media.Video object (not the
I have a flash video player that I would like to embed in other
I have created a pretty basic Flash website for a client and am having
Let's say that I have a Flash website where you could create an avatar
I have created a PHP-script to update a web server that is live inside

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.