10 Replies Latest reply on Mar 19, 2010 7:18 PM by DigitalArchitectCanada

    Error 1009

    brando78 Level 1

      Hello there, I am unable to trouble shoot an Error 1009 message. Simply enough, I am using the UILoader with AS3 to load a .swf file into the main timeline with // loadWindow.source = "projects.swf"; // I get the 1009 Error. When I remove any action script (just a // stop(); // ) function from the .swf file I am trying to load, I do not get the error message.

       

      I have never had this issue on any other projects with identical structure.

       

       

       

      Any thoughts?

       

      Brando

        • 1. Re: Error 1009
          DigitalArchitectCanada Level 3

          Can you paste in your code or provide a link to your source? If you need an FTP to upload your source to I can provide one.

           

           

          Jesse

          1 person found this helpful
          • 2. Re: Error 1009
            brando78 Level 1

            I have two scenes: Home and Projects

             

            The Home timeline has the following code so far:

             

            about_btn.addEventListener(MouseEvent.CLICK, goAbout);

             

            function goAbout(e:MouseEvent):void {

            gotoAndStop("about");

            }

             

            projects_btn.addEventListener(MouseEvent.CLICK, goProjects);

             

            function goProjects(e:MouseEvent):void {

            gotoAndStop("projects");

            }

             

            When the playhead lands on the "projects" frame, there is this code:

             

            loadWindow.source = "index-flash_projects.swf";

             

            "index-flash_projects.swf" is a scene with only this code at the moment:

             

            stop();

             

            When I remove // stop(); // from the "projects" timeline, I do not get the Error 1009 message.

             

            Thank you for the speedy response.

             

            Brandon

            • 3. Re: Error 1009
              Ned Murphy Adobe Community Professional & MVP

              It is likely your UILoader and the code addressing it are disconnected somehow.

               

              The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....

               

              - is not in the display list
              - doesn't have an instance name (or the instance name is mispelled)
              - does not exist in the frame where that code is trying to talk to it
              - is animated into place but is not assigned instance names in every keyframe for it
              - is one of two or more consecutive keyframes of the same objects with different names assigned.

               

              If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

              1 person found this helpful
              • 4. Re: Error 1009
                DigitalArchitectCanada Level 3

                Yeah Ned is 100% right and what most likely happened is that your  code is getting out of synch with wherever the component is. That's one  of the big issues with coding along the timeline. I really wish adobe  would make it so you couldnt do that, so you could only do basic  animation and stuff no code because it really messes people up and gets  them on the wrong track. Ned's solution will help you out if you're  really having problems upload your FLA somewhere and again if you need a ftp server to upload to let me know.

                 

                Jesse

                • 5. Re: Error 1009
                  brando78 Level 1

                  I actually saw a similar post of yours regarding a Error 1009.

                   

                  The UIloader works fine when there is no Action Script in the .swf being loaded. As soon as I add Action Script to the .swf file being loaded I get the error.

                   

                  It seems everything is set up properly (instance names, etc.)

                   

                  Furthermore when the error message comes up it references frame 46 that only has this code on it:

                   

                  about_btn.addEventListener(MouseEvent.CLICK, goAbout);

                   

                  function goAbout(e:MouseEvent):void {

                  gotoAndStop("about");

                  }

                   

                  projects_btn.addEventListener(MouseEvent.CLICK, goProjects);

                   

                  function goProjects(e:MouseEvent):void {

                  gotoAndStop("projects");

                  }

                   

                  Thank you!

                  • 6. Re: Error 1009
                    DigitalArchitectCanada Level 3

                    Hmm if both of those buttons are in place and on that frame... not sure unless the timeline is not being stopped on them or what I don't know its hard to say. If you want just email me the fla (ascensionsystems (at) gmail dot com) I'll check it out this is one of those things where you just gotta look at it.

                    • 7. Re: Error 1009
                      brando78 Level 1

                      Email sent.

                       

                      Thanks for the help.

                      • 8. Re: Error 1009
                        DigitalArchitectCanada Level 3

                        Do me a favor and try  this test. I'm assuming that the file being loaded  "index-flash_projects.swf" is as2, yes? There is code in there that is  placed on buttons. Try removing that code or even all code from that  file, republish it and test everything again. I'll bet 10 points your problem goes away lol

                        • 9. Re: Error 1009
                          brando78 Level 1

                          Thanks for all the help. But I think I am going to have to step away from this. The project was originally AS2 but I decided to change it to AS3 so I could integrate Google Maps for Flash. I thought that I deleted all AS2 and republished all scenes in AS3, but apparently there is some still there that I can not find.

                           

                          When my head cools down I will revisit this.

                           

                          Thank you all so much.

                          • 10. Re: Error 1009
                            DigitalArchitectCanada Level 3

                            The problem is that you can attach code right onto a button and you won't know its there unless you click the button and press F9. That does answer your question about what is wrong though,so if you don't mind please mark the question as answered. If you need any further help though feel free to start up another thread or email me personally.

                             

                            Jesse