A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Fix for the Firefox "Transfering Data From.." bug

  1. #1
    Senior Member random25's Avatar
    Join Date
    Apr 2002
    Posts
    566

    Fix for the Firefox "Transferring Data From.." bug

    Some of you may have noticed that the status bar in Firefox will show "Transferring Data From yourdomain.com" even after the page and all flash content have finished loading.
    Internet Explorer does not have this problem, so i am calling it a Firefox bug.

    I have searched and found many people with this problem, but no solutions.


    I have made a workaround to this, and would like to share it here for everyone.

    This workaround uses swfobject, and ExternalInterface to call a javascript function.

    Ok, here we go.


    1.
    Stick this code in the head section of your page:
    Code:
    <script type="text/javascript">
    function DoneLoading() {
    var so = new SWFObject("", "", "0%", "0%", "8", "#000000");
    so.write("DoneLoading");
    }
    </script>
    2.
    Stick this div at the end of the body section of your page:
    Code:
    <div id="DoneLoading">
    </div>

    3.
    This is the flash action script to call the javascript function:
    Code:
    import flash.external.*;
    ExternalInterface.call('DoneLoading');
    And that is all you need to do.
    swfobject will start to try to load a .swf that does not exist into the "DoneLoading" Div, and will then send the data to Firefox that it is done loading, and the pages status will show done.
    Last edited by random25; 02-19-2008 at 12:02 PM.

    If you want to make an apple pie from scratch, you must first create the universe. Carl Sagan

  2. #2
    Junior Member
    Join Date
    Mar 2008
    Posts
    1
    Hello Random25, this is amazing but, where put this :

    3.
    This is the flash action script to call the javascript function:

    Code:
    import flash.external.*;
    ExternalInterface.call('DoneLoading');

    My flash is: mp3player of: jeroenwijering

    Thanks, Regards...

  3. #3
    Senior Member random25's Avatar
    Join Date
    Apr 2002
    Posts
    566
    I assume you already have a way of knowing when your content is done loading.
    If so, You can run that code when the content has finished loading.

    Otherwise you should learn about preloaders first, so you can tell when your content is loaded.

    If you want to make an apple pie from scratch, you must first create the universe. Carl Sagan

  4. #4
    Junior Member
    Join Date
    Jul 2009
    Posts
    1

    now i think i can live with it. i'm more safari for flash.

    I tried your fix really quick, but it didn't work. It might be my already existing swfObject script or the version I'm using. No big deal, I don't think I'm going to mess with my existing schtuff, I'm just happy to read that this bugs someone other than me. Now I can live with it.

    I've gone a step further and installed the Extended Status Bar 1.5.4 where it still says: "Transferring data from www.mydomain.com" and if the site is cached it'll say: "Read www.mydomain.com" ... along with some other info that is irrelevant when it comes to loading .swfs.

    Thanks for confirming this annoying little punk. As long as it doesn't show up in IE, I'm fine with it. :-)

  5. #5
    Junior Member
    Join Date
    Jan 2011
    Posts
    1
    WORKING SOLUTION:

    Hi all I found a working solution for this problem:
    so, what happens is that the event.COMPLETE is never sent
    (because never received for a firefox bug).
    So the workaround is to listen also to the PROGRESS event.
    Inside the handler for this event you check bytesLoaded/bytesTotal
    if bytesLoaded == bytesTotal then you can mark a flag that
    says "Ok it is completed".
    Then you also listen for HTTPStatus Events and if you receive
    an HttpStatus Event with code == 0 (the bug), you check
    the flag, if it has been set to "ok it is completed" then you
    MANUALLY call the completeHandler (because it will be not
    called by the framework).
    Thats all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center