PDA

View Full Version : How to detect if a flash file is broken


marc1
05-10-2008, 11:55 AM
Hello. I can't believe I found nothing about this when searching the net... but here goes:

How can I see if a flash file (.swf) is broken?

And by broken I mean it hasn't been downloaded/uploaded completely. Like if you upload a flash file to your friend and when the file is only 75% uploaded your Internet goes down.

The flash file have complete headers and background information/dimensions etc, but it does not have an ending! When a broken flash file is played it will either not show (if you right click it it will say "Movie not loaded") or in some cases play like normal up until the end where it will just stop.

I have now explained how we humans know the flash file is broken. What I wish to do is detect wheather it is broken or not by using a program (.exe) or by executing code (PHP/ASP).

Is it possible to search for a end byte or something? I'm assuming the flash format has some sort of end-of-file signature, but I'm not experienced with such things so I need your help.

--

Short version of above:

How can I detect if a flash file hasn't been downloaded completely by means of a program or a script?

Important: Please understand that involving the program that either recieves or sends the flash file is not an option. The solution must be appliable to any old flash file found on your hard drive to check if it's broken or not.

--

It is very important for me to find a solution to this problem, and I'm sure the answer will be appreciated by many surfing to this page through their search results.

Thank you for your time.

marc1
05-11-2008, 08:41 PM
I know the question isn't easy but I really need an answer so please, if you know anything at all, write something.

marc1
05-12-2008, 11:03 PM
Surely someone must know something?

Did I place this in the wrong category?

atomic
05-12-2008, 11:58 PM
With 112 views, if anything was obvious, it would be out by now!

kool-Aid
05-13-2008, 04:31 PM
I am not very versed in asp or php, but i know when you download a picture dynamically you can track the total file size.

So in your upload script could detect the total file size, and if the file does not write that many kb's to your server perform a function? That would not be a flash function it would have to be server side.