Solved

Wrong bytesTotal for loaded swf

Posted on 2004-10-11
8
324 Views
Last Modified: 2012-05-05
I have a preloader. It loads external swf.

In the following construction:

mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
      trace(bytesTotal);
      trace(target_mc.getBytesTotal());
}

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?
0
Comment
Question by:hsmtp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 8

Expert Comment

by:Cerf
ID: 12277695
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...

Cërf.
0
 
LVL 6

Author Comment

by:hsmtp
ID: 12278051
Cerf,

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).
0
 
LVL 6

Author Comment

by:hsmtp
ID: 12278087
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:Cerf
ID: 12278112
:(
Browser cache problem? maybe?
I know it is very simple and I bet you already have tryied that but still...
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12278120
ok, I see it
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13264380
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question