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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:36:36+00:00 2026-05-10T14:36:36+00:00

Alright, currently I have my SWF hitting a php file that will go and

  • 0

Alright, currently I have my SWF hitting a php file that will go and find all the files I specify to it, add their sizes together and return their combined sizes as one number. I then use this number with a ProgressEvent listener to determine the current percentage of files downloading for that particular section of the website.

Pretty straightforward right? Well now using that PHP file is out of the question and I’m attempting to do everything inside the SWF instead of having it hit an outside script to get the numbers I need.

Is there any good way to get a file’s size BEFORE I start loading it into flash? I really need the preloader to be a 0 to 100% preloader so I need the total number of bytes I will be downloading before it actually starts.

One thought I had was to just go through the array holding the file URLs, start loading them, getTotalBytes without displaying any loading, kill the load on the first tick, add up all those total bytes numbers, and then start the actual downloading process. This method seems very ugly and it will be a huge time waste as every time the user hits a pre loader on the site it will probably take a second or two to run through all the files, find their total and then actually start downloading.

Is there a better solution to this problem without going outside of flash to get the size of those files?

  • 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. 2026-05-10T14:36:37+00:00Added an answer on May 10, 2026 at 2:36 pm

    You could do an HTTP HEAD request to the server for the files. This will return the header info (including file size) but not the actual file. You could then make a GET request to load the files.

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

    (Check out section 9.4 HEAD)

    What I would probably do is a two tier progress bar (with 2 progress bars). One showing overall progress (0 to 100%) and one showing per file progress (as each file is downloaded).

    That way, as long as you know the number of files to load, you can do the total progress without first having to hit the server to get the file sizes.

    mike chambers

    mesh@adobe.com

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

Sidebar

Ask A Question

Stats

  • Questions 241k
  • Answers 241k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Other than HTTP cookies, there's nothing in the protocol specification… May 13, 2026 at 7:23 am
  • Editorial Team
    Editorial Team added an answer Yes, it is possible. Assuming you're trying to convert it… May 13, 2026 at 7:23 am
  • Editorial Team
    Editorial Team added an answer The Register(AllTypes... syntax is only the start - you have… May 13, 2026 at 7:23 am

Related Questions

I am playing with Google App Engine and Python and I cannot list the
Alright. So I have a very large amount of binary data (let's say, 10GB)
Alright, I'm having a hard time explaining this, let me know if I should
[Note : I've simplified my example for clarity] Let's say that I have a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.