2 Replies Latest reply on Sep 15, 2006 8:04 AM by b_rand

    Browser needs refresh for animation to work

      I have created a Flash site with animations at startup as well as a preloader.

      During delopment, testing works fine (ctrl+Enter or F12). However, when uploading and testing it from the server, the initial load of the site shows no animation - no pre-loader or initial animation. Then, if the browser is refreshed, the site works fine.

      I am sure that this is something simple, so I apologize for the dumb question, but any help would be appreciated.

        • 1. Re: Browser needs refresh for animation to work
          Level 7
          It sounds like scripting problem. . you are most likely jumping ahead in the
          movie to frames that are not yet loaded. probably a problem in your
          preloader code. After you refresh, the SWF is coming fully loaded form the
          cache, so you don't get the problem.

          • 2. Re: Browser needs refresh for animation to work
            b_rand Level 1
            I wonder if that is the problem too, but I can't find that in my code. Here is the code on the main timeline first frame.


            var root_mc:MovieClip = this;
            var total_bytes:Number = 0;

            preLoader_mc.onLoad = function() {
            total_bytes = root_mc.getBytesTotal();

            preLoader_mc.onEnterFrame = function() {
            var bytes_loaded:Number = 0;
            var percent_complete:Number = 0;
            bytes_loaded = root_mc.getBytesLoaded();
            percent_complete = int(bytes_loaded/total_bytes*100);
            if (bytes_loaded == total_bytes) {
            delete preLoader_mc.onEnterFrame;

            if I comment out the statement :


            Then the playback simply stops - as expected.

            Any other ideas?