7 Replies Latest reply on Aug 2, 2009 10:37 AM by kglad

    Prepend "loading..." module?

    MurrayComputing

      Hello to All -

       

      Helping a friend who has a flash SWF file to embed in his website. I have done that, but the file is approx 40MB, and it takes a while to load. It does not have any "loading..." message or animation, and I'm not a Flash programmer - is there a way to prepend a "loading..." animation of some kind? Can I put up a stand-alone image that displays only until the Flash movie starts playing, without Flash programming?

       

      Thanks for your help and your time,

      John

        • 1. Re: Prepend "loading..." module?
          kglad Adobe Community Professional & MVP

          you'll need to use some code to display a preloader (or static image) until loading is complete and you're ready to display the full swf.

          • 2. Re: Prepend "loading..." module?
            MurrayComputing Level 1

            Okay Kglad, thanks. I'll have to try something else, maybe I can use a separate background photo. Not going to tear down this flash file and rebuild it.

            Thanks again,

            John

            • 3. Re: Prepend "loading..." module?
              kglad Adobe Community Professional & MVP

              the easiest thing to do is to create a separate preloader containing fla that loads your 40mb swf.

              • 4. Re: Prepend "loading..." module?
                MurrayComputing Level 1

                kglad, I understand the concept of what you describe, but have no clue as to how to get it done. You have been very helpful, are there examples somewhere of how to do this? Will I need to purchase Flash as well?

                 

                Thanks again,

                John

                • 5. Re: Prepend "loading..." module?
                  kglad Adobe Community Professional & MVP

                  you'll need to purchase flash or have someone else create a preloader for you.  there's not necessarily much to a preloader, though:

                   

                  var ldr:Loader=new Loader();
                  var urlR:URLRequest=new URLRequest("your40mbswf.swf");

                   

                  var tf:TextField=new TextField();
                  addChild(tf);
                  tf.text="0% Loaded";
                  tf.autoSize="left";
                  tf.x=(stage.stageWidth-tf.width)/2;
                  tf.y=(stage.stageHeight-tf.height)/2;

                   

                  ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progressF);
                  ldr.load(urlR)

                   

                  function progressF(e:ProgressEvent){
                  tf.text = Math.round(100*e.bytesLoaded/e.bytesTotal).toString()+"% Loaded";
                  if(e.bytesLoaded==e.bytesTotal){
                  removeChild(tf);
                  addChild(ldr);
                  }
                  }

                  • 6. Re: Prepend "loading..." module?
                    MurrayComputing Level 1

                    kglad - question: I'm helping a friend post slideshows converted to swf files online. They feature his classic car collection. Each of the 9 or 10 slideshows is approx 35 to 40 MB in size, and each will take a while to load. Would it be possible for someone who knows what they're doing to take those swf files and add a "loading ..." section to the beginning of each one? If not, would one of the "preloader" modules as you describe in your last message be required for each of the swf files? Finally, would you consider doing this work "for hire?" If you would, please let me know what your charges will be and what you would require to proceed. I can supply the swf files and a place online to work on/test them if that would help.

                     

                    Thanks again,

                    John

                    • 7. Re: Prepend "loading..." module?
                      kglad Adobe Community Professional & MVP

                      send me an email via my website:  www.kglad.com