• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

Wrong bytesTotal for loaded swf

I have a preloader. It loads external swf.

In the following construction:

mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {

I get only one value - 1126163 bytes. But I know that the real file size is 495965 bytes.
How could it be? How can I solve this?
  • 3
  • 2
1 Solution
I saw once a piece of AS that used: if (_this.URL <> _parent.URL) { //preloader code}  or somethig really similar to it, and besids the code it was explained that they were waiting for the movie to be ready to start preloading, I didn't fully understand the concept behind that but maybe it has something to do with your problem...

hsmtpAuthor Commented:

Unfortunately it will not help me. onLoadProgress makes me sure that Flash really thinks that the file it loading is 1126163 bytes and everything is ready for preload (I'm not getting -1).
hsmtpAuthor Commented:
I found explaination here: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=288&threadid=854993&highlight_key=y&keyword1=bytesTotal

you are seeing the uncompressed value of the swf file with getBytesTotal(). (There is an option to compress the swf in the publish settings)

But still the question to get real file size is opened.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Browser cache problem? maybe?
I know it is very simple and I bet you already have tryied that but still...
ok, I see it
PAQed with points refunded (500)

Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now