Solved

Wrong bytesTotal for loaded swf

Posted on 2004-10-11
8
322 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
  • 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

821 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