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 8589053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:57:10+00:00 2026-06-11T22:57:10+00:00

Im loading multiple SWF of the same file Example: var movies:Array = new Array

  • 0

Im loading multiple SWF of the same file
Example:

      var movies:Array = new Array ("Symbols/00.swf","Symbols/00.swf","Symbols/00.swf");

My loading method works fine, below im using:

var perc:int = (event.bytesLoaded / event.bytesTotal) * 100;
Loading.text = "loading " +perc + "%";

The Problem im having is the the loading text is at %100 after iv downloaded one item from the Movies:Array.

This would be happening because the remainder files are already in the catch.

The question is:
How would I be able to slow this loading text to determine if all the items are ready.Basically the problem is that the loading text saids complete but all my other files
are not ready yet…

  • 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-11T22:57:11+00:00Added an answer on June 11, 2026 at 10:57 pm

    First, why do you ever load one SWF multiple times? You can use the following trick: How to display multiple instances of loaded SWF. And second, you are using your Loader object to load one SWF at a time, and its progress will be related to that single SWF. So, you first load all unique SWFs and store their Loader references somewhere, in order to instantiate more of those if you need to, and second, you are to collect total percentage from progress event listener. The latter is slightly complicated, because you are most likely using a single progress event listener for all the loaders. You, for example, can do something like this:

    public static var ALL_LOADERS:Object;
    public static var PROGRESS_DATA:Object; // we need associative arrays here
    public static var BYTES_LOADED:int=0;
    public static var TOTAL_BYTES:int=0;
    
    public static function RegisterLoader(path:String,loader:Loader):void {
        if (!ALL_LOADERS) ALL_LOADERS=new Object();
        if (!PROGRESS_DATA) PROGRESS_DATA=new Object();
        ALL_LOADERS[path]=loader;
        PROGRESS_DATA[loader]=new Object();
        PROGRESS_DATA[loader].bytesLoaded=0;
        PROGRESS_DATA[loader].bytesTotal=-1;
    }
    
    // now a listener
    public static function progressListener(e:Event):void {
        var l:Loader=e.target as Loader;
        if (!l) return; // that wasn't a loader that sent the event. Uh oh
        var plo:Object=PROGRESS_DATA[l];
        if (!plo) return; // unregistered loader. Ignore
        if (plo.bytesTotal<0) {
            plo.bytesTotal=e.bytesTotal;
            TOTAL_BYTES+=e.bytesTotal;
        }
        var pbl:int=plo.bytesLoaded;
        plo.bytesLoaded=e.bytesLoaded;
        LOADED_BYTES+=(e.bytesLoaded-pbl);
        var perc:int = (LOADED_BYTES / TOTAL_BYTES) * 100;
        Loading.text = "loading " +perc + "%";
    }
    

    Note, as the loading process is designed to be run only once, all initialization is made once, and this code does not have error handling – you can, however, write it yourself.

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

Sidebar

Related Questions

Is it possible to load multiple files from a project directory. For example, loading
I'm loading multiple swf files from the main menu which is never unloaded. I've
Possible Duplicate: Loading multiple versions of the same class What is the best way
I am having trouble returning multiple entities (eager loading) using the Include() method. I
What is the best way to design a SSIS package? I'm loading multiple dimensions
Emulating multithreading by loading a DLL multiple times (it's designed for this). Since LoadLibrary()
I have multiple pdf files. Based on user input i am loading the pdf
When loading the class, using method forName() , any static initializers in the class
I'm working on a website built in Flex, but the SWF file after compiling
Loading multiple child forms from a loop into a MDI parent form. They are

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.