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

  • SEARCH
  • Home
  • 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 8386301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:53:55+00:00 2026-06-09T17:53:55+00:00

I have an issue with a child SWF loaded into a parent. The loading

  • 0

I have an issue with a child SWF loaded into a parent. The loading is pretty basic, everything should be ok. The problem is when the child has more than one frame, the SWF just loops indefinitely. When completed the child will have multiple frames and forward/back buttons, but I’ve distilled it down to two frames with a different image on each and no code save for stop();
I have another parent which I didn’t create (and you don’t want to see) that will accept an AS2 SWF but loops on AS3, which is where this whole project originated…
Any insight is greatly appreciated….

This is the code for the parent:

var _swfLoader:Loader;
var _swfContent:MovieClip;

loadSWF("test4.swf");

function loadSWF(path:String):void {
   var _req:URLRequest = new URLRequest();
   _req.url = path;

   _swfLoader = new Loader();
   setupListeners(_swfLoader.contentLoaderInfo);

   _swfLoader.load(_req);
}

function setupListeners(dispatcher:IEventDispatcher):void {
   dispatcher.addEventListener(Event.COMPLETE, addSWF);
   dispatcher.addEventListener(ProgressEvent.PROGRESS, preloadSWF);
}

function preloadSWF(event:ProgressEvent):void {
   var _perc:int = (event.bytesLoaded / event.bytesTotal) * 100;
   // swfPreloader.percentTF.text = _perc + "%";
}

function addSWF(event:Event):void {
   event.target.removeEventListener(Event.COMPLETE, addSWF);
   event.target.removeEventListener(ProgressEvent.PROGRESS, preloadSWF);

   _swfContent = event.target.content;
   _swfContent.addEventListener("close", unloadSWF);

   addChild(_swfContent);
}

function unloadSWF(event:Event):void {
   _swfLoader.unloadAndStop();

removeChild(_swfContent);
   _swfContent = null;
}
  • 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-06-09T17:53:57+00:00Added an answer on June 9, 2026 at 5:53 pm

    Did DaveGaur answer your question here?
    AS3 Stop external swf

    By default, when a MovieClip is added to stage, it will play. If the MovieClip only has one frame, this will not look different. Complete event is not called until all frames and children are loaded. Dave said the INIT event is called when first frame is ready to play. So, for your code, Dave might have suggested something like this near setupListeners:

    dispatcher.addEventListener(Event.INIT, stopContent, false, 0, true);
    
    function stopContent(event:Event) {
        event.target.removeEventListener(Event.INIT, stopContent);
        _swfContent = event.target.content as MovieClip;
        _swfContent.stop();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I have an issue whereby only my parent is being inserted into
I have one issue with retrieval Parent/Child relationship of type Folder Hierarchy Ideally, in
I have an SWF loading in an SWF containing a papervision scene. I've done
I have a tricky issue with gmake, when I build from the parent directory,
I have an issue when deleting a child record from the session. Here are
I have a parent interface and a child interface which objects will implement. I've
In a current Flex project, i have an issue where a certain child component
I'm having a problem.. Actually I do have an issue when sending a value
I have an issue where I need to find the top level parent account
i have this issue : Cannot add or update a child row: a foreign

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.