11 Replies Latest reply on Sep 22, 2010 11:02 PM by kglad

    Preloader at 80%

    ottz0 Level 1

      Hi

       

      I have my preloader which seems to be working correctly, however it only becomes visible as around 80%.

       

      So the page is blank up until then, then after that the loading bar is finishing and then goes to the rest of the site

       

       

      Any ideas on this pls.

       

      Any good AS2 preloader code if anyone knows a good preloading script

       

      thanks

        • 1. Re: Preloader at 80%
          kglad Adobe Community Professional & MVP

          nothing is displayed in a flash file until all the frame 1 assets are loaded.  in particular, everything exported for actionscript in frame 1 (in as2 that would include embedded fonts and objects with a linkage id) will load before a preloader is displayed.  if you have a lot of exported assets (especially sounds), that will cause the problem you're seeing.

           

          to remedy, either create an external preloader (that loads your main swf) or set your exported assets to load in some frame other than 1.  doing the former is easier for novices while doing the latter is usually easier for experienced flash users.

          • 2. Re: Preloader at 80%
            ottz0 Level 1

            I have nothing placed on frame 1 accept the logo and loading bar and a small background for it.

             

            My file size is only 580 kb and has no sound but uses attach movies

             

            How do you set your exported assets to load in other than frame 1

             

            http://www.testing.curiousconcepts.com/

             

            thanks

            • 3. Re: Preloader at 80%
              kglad Adobe Community Professional & MVP

              1.  go through your library items linkage properties and untick "export in frame 1" for each one.

               

              2.  click file/publish settings/flash/actionscript settings and change the "export classes in frame 1", to frame 2 assuming your preloader is limited to frame 1 and no linked item is needed in frame 1.

              • 4. Re: Preloader at 80%
                ottz0 Level 1

                Cool, Thanks for your help

                • 5. Re: Preloader at 80%
                  kglad Adobe Community Professional & MVP

                  you're welcome.

                  • 6. Re: Preloader at 80%
                    ottz0 Level 1

                    Actually I got the preloader to load and now the button actions do not work, even being they do not come in on frame 35.

                     

                    If I recheck the MC's to load in frame 3 the preloader comes back in 80% again

                    • 7. Re: Preloader at 80%
                      kglad Adobe Community Professional & MVP

                      you can use any items exported for actionscript until the frame designated in the publish settings load.  otherwise, there should be no problem.

                      • 8. Re: Preloader at 80%
                        ottz0 Level 1

                        For any reason, I tell it to add linkage at frame 2 or 22 it does not matter. it still somehow loads in frame 1.

                         

                        I can tell it does this by the bandwidth profiler.

                        • 9. Re: Preloader at 80%
                          kglad Adobe Community Professional & MVP

                          then you haven't unticked export in frame 1 for all the exported assets or you haven't changed the publish settings.  you need to do both.

                          • 10. Re: Preloader at 80%
                            ottz0 Level 1

                            I have done this and it now preloads correctly.

                             

                            But the attach movie code does not action the buttons. the roll overs work over and out but not the on press.

                             

                            rapidshare.com/files/420503232/siteCS3.zip

                             

                            on(rollOver){
                                _root.grid1_btn.gotoAndPlay("s1");
                            }
                            on(rollOut){
                                _root.grid1_btn.gotoAndPlay("s2");
                            }
                            on(press){
                                _root.mt_mc.attachMovie("grid_container1", "newgrid_container1", 0);
                                _root.gotoAndStop("clear");
                            }

                            • 11. Re: Preloader at 80%
                              kglad Adobe Community Professional & MVP

                              if the following trace() yields "undefined", you don't have a correct linkage id or you're trying to use that linkage before its export frame:

                               


                               

                              on(rollOver){
                                  _root.grid1_btn.gotoAndPlay("s1");
                              }
                              on(rollOut){
                                  _root.grid1_btn.gotoAndPlay("s2");
                              }
                              on(press){
                                 var mc:MovieClip=  _root.mt_mc.attachMovie("grid_container1", "newgrid_container1", 0);

                              trace(mc)
                                  _root.gotoAndStop("clear");
                              }