9 Replies Latest reply: Oct 8, 2012 5:39 AM by Ned Murphy RSS

    Error #2099 - Help Needed

    whitt682

      Hello All,

      This is my first post here at Adobe.com and I hope that I am posting in the right place.

      I have been attending college and have been working out of a book "Adobe Flash CS5: The Professional Portfolio" by Against the Clock amd I seem to be running into trouble. Im on Project 8, which has a main "website" page and a "UILoader" that calls swf files from a directory within the project.

      ALSO I am using CS5.5 Web Premium Programs.

       

      Well this is the error:

      Error: Error #2099: The loading object is not sufficiently loaded to provide this information.

          at flash.display::LoaderInfo/get loader()

          at fl.display::ProLoader/get realLoader()

          at fl.display::ProLoaderInfo()

          at fl.display::ProLoader()

          at fl.containers::UILoader/initLoader()

          at fl.containers::UILoader/load()

          at fl.containers::UILoader/set source()

          at seabreeze_fla::MainTimeline/__setProp_homeContent_Scene1_PageContents_0()

          at seabreeze_fla::MainTimeline/frame1()

       

      screen1.gif

      and this is the main page UILoader Pointing to the Directory

       

      import flash.events.MouseEvent;

       

      stop();

       

      home_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      passes_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      plan_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      attractions_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      group_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      about_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      guests_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      join_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      contact_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      new_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      specials_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      calendar_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      group2_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

      passes2_btn.addEventListener(MouseEvent.MOUSE_UP, browse);

       

      function browse(event:MouseEvent):void {

          switch (event.target.name) {

              case "home_btn" : gotoAndStop("home");

              break;

              case "passes_btn" : gotoAndStop("passes");

              PageHead.text = "Buy Passes Online";

              break;

              case "plan_btn" : gotoAndStop("plan");

              PageHead.text = "Plan Your Visit";

              break;

              case "attractions_btn" : gotoAndStop("attractions");

              PageHead.text = "Attractions";

              break;

              case "group_btn" : gotoAndStop("group");

              PageHead.text = "Group Sales";

              break;

              case "about_btn" : gotoAndStop("about");

              PageHead.text = "About the Park";

              break;

              case "guests_btn" : gotoAndStop("guests");

              PageHead.text = "Our Guests Say...";

              break;

              case "join_btn" : gotoAndStop("join");

              PageHead.text = "Join Club Seabreeze";

              break;

              case "contact_btn" : gotoAndStop("contact");

              PageHead.text = "Contact Us";

              break;

              case "new_btn" : gotoAndStop("new");

              PageHead.text = "What's New";

              break;

              case "specials_btn" : gotoAndStop("specials");

              PageHead.text = "Special Offers";

              break;

              case "calendar_btn" : gotoAndStop("calendar");

              PageHead.text = "Park Calendar";

              break;

              case "group2_btn" : gotoAndStop("group");

              PageHead.text = "Group Sales";

              break;

              case "passes2_btn" : gotoAndStop("passes");

              PageHead.text = "Buy Passes Online";

              break;

          }

      }

      The Main Code^ was working and still is, but the UILoader seems to not be gathering the nessesary files.

      Capture1.PNG--->>>>Capture2.PNG

      This is where the main "seabreeze" file is located and the Children Folder that I am Calling files from.

       

      I hope that I am not going over board with this, and I have recieved a good grade for this even with this error, but I would like to actully "understand" what is going on here.

       

      Thanks in advance,

      Aaron W.

        • 1. Re: Error #2099 - Help Needed
          Ned Murphy MVP

          What code are you using to load content into the UILoader?

          • 2. Re: Error #2099 - Help Needed
            whitt682 Community Member

            Ned Murphy wrote:

             

            What code are you using to load content into the UILoader?

            Thanks for the quick reply.

            From what I am understanding from this book I am working out of a UILoader componet is soposed to be a "quick route" for calling files to the Loader Field just by changing the Properties-->Componet Paramaters-->Source and that the Instance Name really does not matter in this setup. They describe the UILoader as a "shortcut", therefore I have no script to call this because of this, only the Source Parameter defined for each file I would like to display on my "Page Contents" layer every 5 frames.

            So, is the Source Parameter how to call external files with out AS3?

            Or is there code that goes with the UILoader that I am missing?

            • 3. Re: Error #2099 - Help Needed
              Ned Murphy MVP

              Using the component you can have it load content without code, but if you have a string of that same component working its way down the timeline in that layer you might have a problem getting the ones after the first to load their own content.  When you have the same objects in adjacent frames the latter ones will inherit the properties of the former ones, of which the source could well be one.  What you should do instead of what you appear to have done is just use one instance of the UILoader in that layer, give it an instance name, and in all the frames where the source changes, use code to assign the source property.

               

              But that is not likely to be related to the problem you have at the moment.  It seems as if the component has lost some of its brains, which can happen if you were to go into the library and remove stuff that the component needs to function properly... it is a tempting thing to do when you drag a component in and then see a bunch of extra stuff end up there that you don't think you need.

               

              You could try removing the current component altogether and then add a new one into the library by placing one on the stage again.

              • 4. Re: Error #2099 - Help Needed
                whitt682 Community Member

                Reply to Ned Murphy:

                 

                Good Morning. I want to say agiain how much I do appreciate the help. I can assure you that I have not deleted anything but I will delete the UILoader and try to apply the source settings again to the a new loader.

                 

                **Went to Components --> User Interface --> UILoader and placed it on the stage, and still not working.**

                 

                Is there a way to declare these "missing" attributes in AS3? I know that this kind of defeats the purpose, but is it possiable?

                • 5. Re: Error #2099 - Help Needed
                  Ned Murphy MVP

                  I don't normally use components so I haven't much to offer in the way of helping when they seem to go bad.  What you might try instead of using the UILoader is to use the Loader class and have your content added via using code.

                   

                   

                  // frame 1 code

                  var ldr:Loader = new Loader();   // used "ldr", but could have named it whatever

                  ldr.x = ?;                             // use the x location of the current UILoader for the ?

                  ldr.y = ?;                             // use the y location of the current UILoader for the ?

                  addChild(ldr);

                  ldr.load(new URLRequest("Children/home.swf"));

                   

                   

                  next section...

                   

                  // frame 5 code

                  ldr.load(new URLRequest("Children/passes.swf"));

                   

                  etc...

                  • 6. Re: Error #2099 - Help Needed
                    whitt682 Community Member

                    Ned Murphy wrote:

                     

                    I don't normally use components so I haven't much to offer in the way of helping when they seem to go bad.  What you might try instead of using the UILoader is to use the Loader class and have your content added via using code.

                     

                     

                    // frame 1 code

                    var ldr:Loader = new Loader();   // used "ldr", but could have named it whatever

                    ldr.x = ?;                             // use the x location of the current UILoader for the ?

                    ldr.y = ?;                             // use the y location of the current UILoader for the ?

                    addChild(ldr);

                    ldr.load(new URLRequest("Children/home.swf"));

                     

                     

                    next section...

                     

                    // frame 5 code

                    ldr.load(new URLRequest("Children/passes.swf"));

                     

                    etc...

                    Wow, what a BIG help Mr. Murphy! I was thrilled to at least see the content on the Home page of the website. The only problem that I am having now is that the new Loader is not defined by a Width or a Height in AS3, so the flash file gathered is not resized down to the content area. I am guessing that I will just need to resize the *.swf files in the Children folder, BUT is there a way to define the .w and .h of the Loader? I have tried ldr.w and ldr.h but was not successful.

                     

                    Although this is not the solution for the UILoader, the Loader AS3 is a great alternative to display content from a local directory. Thanks for the very Helpful Awnser and the code works like a charm, just need legenth and width parameters.

                    • 7. Re: Error #2099 - Help Needed
                      Ned Murphy MVP

                      A loader is a widthless/heightless entity without any content in it.  One thing you can do if you know the proportions of the content you will load is to use the scaleX/scaleY properties to scale the loader. 

                       

                      I am saying this with crossed fingers, but I am pretty sure if you scale the loader before it holds anything that scaling will work.  So you might want to just try the scaling instead if the content will allow for that approach.  You just can't adjust the width and height until the loader actually holds some content.

                       

                      If you want/need to adjust the width and height instead, then you need to wait until the loader content is loaded.  You can assign an Event.COMPLETE event listener to the contentLoaderInfo property of the Loader and use that to call a function that changes the width/height after the loading is complete.

                       

                      ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, adjustStuff);

                       

                      function adjustStuff(evt:Event):void {

                           // file is loaded - make adjustments here

                      }

                      • 8. Re: Error #2099 - Help Needed
                        whitt682 Community Member

                        Response to 7. Ned Murphy:

                         

                        Hello again. I have been very busy for the last day and I hope you do not take me for rude but I just wanted to follow up on this topic. Thanks again for all the help, but I cannot seem to find the properties for the loader anywhere (the properties that effect the above code). This is okay because I do understand that from the X and Y coordinents the Loader will "Fill" the remaining screen with the content, and this works for my project but like I said I do like UNDERSTANDING what I am soposedly learning.

                         

                        On another note, This has been a very plesent first experiance on adobe.com forums and Mr. Ned Murphy sir, you are a guru. Thanks again, and like I said this helped me and I hope this helps others in the future.

                         

                        -Aaron W

                        • 9. Re: Error #2099 - Help Needed
                          Ned Murphy MVP

                          You're welcome Aaron.  When it comes to learning and solving problems with Flash, the three tools I utilize most are the Flash Help documentation, Google, and trial and error.  If you learn how to make the most of the Help documentation you can often solve alot of the "Whys" that you come across.