16 Replies Latest reply on Nov 1, 2010 7:30 AM by Ned Murphy

    Loading multiple external images

    Nicky_88

      Hi, I'm very new to Flash cs5 and I have created invisible buttons which when clicked will load an image into a UILoader.

      When testing, an output error message comes up saying:

       

      Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///E|/butcher1/images/cut0.jpg

       

      I thought it might have been incorrect naming conventions or instance names but I have checked and I'm sure i've got it all right.

       

      Could it possibly have something to do with my setup of the timeline as I have all my layers on the same line..if that makes sense??

       

      Should I start all over?

       

      This is really doing my head in, I would be sooo happy to have some help on this.

      Nicky.

       

      This is what some of the code looks like an i have done the same for the rest of the invisible buttons

       

      this is what part of the code looks like...

       

       

      cut7_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3);

      function fl_MouseClickHandler_3(event:MouseEvent):void
      {
      // Start your custom code
      // This example code displays the words "Mouse clicked" in the Output panel.
      trace("cut7_btn");
      probackground.iloader.source = "images/cut7.jpg";
      // End your custom code
      }

        • 1. Re: Loading multiple external images
          Ned Murphy Adobe Community Professional & MVP

          Your code appears to be okay, and layers would have no impact on targeting a file for loading.  There most likely is something wrong with either the file name or the path to the file.  I don't think you need to start over, though it never hurts to start over simple to resolve the problem, meaning you could create a new file that just tests loading a file into a UILoader that is free of any other design elements to confuse matters.

           

          In looking at the error message path I see an E followed by "|".  I am not sure what that "|" is about but it doesn't seem right.  Maybe you should try doing this on the C drive and see if that "|" still occurs.

          • 2. Re: Loading multiple external images
            Nicky_88 Level 1

            screenshot.jpg

            Thankyou so much for trying to help me. I tried saving it on the C drive and it still does the "|" and is still saying the same error message.

            I started a new file and just made one invisible button and the UILoader and done the same code to see if it loads the targeted image and it doesn't!

             

            So frustrating, I can't figure where I'm going wrong.

             

            This is a screen dump of what I'm working on, maybe it will give you a clearer idea of what I'm trying to do

            • 3. Re: Loading multiple external images
              Ned Murphy Adobe Community Professional & MVP

              There is probably some sort of path issue in targeting the file. What is the folder structure on your E drive that relates to this swf and the images folder?

              • 4. Re: Loading multiple external images
                Nicky_88 Level 1

                I've saved a file onto my C drive named butcher1 and within that folder is the swf files and another file named images containing the images I am targeting... this is what I seen in a lynda video.

                • 5. Re: Loading multiple external images
                  Ned Murphy Adobe Community Professional & MVP

                  When you are testing this, are you testing just the swf in Flash, or are you testing it via an html page ina browser?

                  • 6. Re: Loading multiple external images
                    Nicky_88 Level 1

                    Both. When I test in IE the invisible buttons appear to be working, except they aren't sourcing images into the UILoader like I want...

                    • 7. Re: Loading multiple external images
                      Ned Murphy Adobe Community Professional & MVP

                      Try placing the image in the same folder as the swf and change the code to load it from there.  Test it in Flash, not the html/browser.  Does it still fail?

                      • 8. Re: Loading multiple external images
                        Nicky_88 Level 1

                        Still no change, and still the error

                         

                        cut9_btn
                        Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///C|/butcher1/cut9.jpg

                         

                        Hmmm, I really don't know where I've gone wrong. It seems like an easy thing, but it's just not happening for me!

                        • 9. Re: Loading multiple external images
                          Ned Murphy Adobe Community Professional & MVP

                          The only suggestion I can offer is to check the spelling of the file name, including the case of the letters and the file extension (.jpg).  Maybe something is captilazied or a different file type is what's in the folder.

                           

                          I can reproduce the error by mistargeting the file I am trying to load in a file I have that uses the UILoader, including that "|" thingy I was wondering about.  So all I can say is that the file you are naming cannot be found.

                           

                          Since you are using CS5 I cannot look at your file to see if I can find anything else, but as is, it all appears functional except for not finding the image file.

                          • 10. Re: Loading multiple external images
                            Nicky_88 Level 1

                            Ok, so I checked all the names again and they are all seem correct.

                            Within the file 'images', I have eleven JPEGs all named to correspond with the individual buttons...cut0.jpg, cut1.jpg, cut2.jpg, cut3.jpg etc....

                            The document is named 'beefproducts' and is situated below the 'images' folder within the file 'butcher1' which I have placed on the C drive.

                            All are in lowercase.

                             

                            I did, however, manage to get rid of the error message by unchecking the autoLoad property in the Component Parameters.

                            However, It is still not loading the jpgs into the UILoader.

                            Do you think maybe I need to change some other property of the UILoaders??

                            • 11. Re: Loading multiple external images
                              Nicky_88 Level 1

                              When testing the buttons now, the output is reading the names like it should be except the targeted image is not loading... Do the individual buttons need to be on separate frames to make this work?

                              It seems like I'm so close to getting this working and it's the only thing that's stopping my website going live.

                              I can't find anyone that can help me because my town is quite isolated and my fellow students haven't ventured into Flash yet,

                              please help me

                              • 12. Re: Loading multiple external images
                                Ned Murphy Adobe Community Professional & MVP

                                Here's a file I made using CS3 for you to download and try.  Clicking the link below should open a download screen.  Place the file in the same folder as the fla file that isn't working for you and test it. 

                                 

                                http://www.nedwebs.com/Flash/AS3_UILoader_Nicky.fla

                                 

                                If it works for you, look for how your design differs.  If it doesn't work... the mystery remains.

                                1 person found this helpful
                                • 13. Re: Loading multiple external images
                                  Ned Murphy Adobe Community Professional & MVP

                                  Back to something you mentioned earlier regarding testing that I didn't catch--thinking it was failing in all test scenarios.  Does it fail to work only when you test in a browser or both when you test the fla in Flash and when you test in the browser?

                                   

                                  If it is only failing when you test in the browser, and your html page is not in the same folder as the swf, then I probably know what the problem is, but I'll wait until you confirm before I explain.

                                  • 14. Re: Loading multiple external images
                                    Nicky_88 Level 1

                                    It isn't working in either unfortunately. I just tested it in flash and opened List Variables in the debug panel and it read this

                                     

                                    Level #0:
                                    Variable _level0.$version = "WIN 10,1,52,14"
                                    Movie Clip: Target="_level0.probackground.iloader"
                                    Variable _level0.probackground.iloader.tabEnabled = false
                                    Movie Clip: Target="_level0.iloader"
                                    Variable _level0.iloader.tabEnabled = false

                                     

                                    Does this mean anything to you? It looks to me like it's saying the loader is not enabled??

                                     

                                    The file you made for me to test also did not work..

                                    Is there any way I could save a file for you to veiw?

                                     

                                    I really appreciate the time you've taken to help me

                                    • 15. Re: Loading multiple external images
                                      Ned Murphy Adobe Community Professional & MVP

                                      That error stuff might be an eye opener, unless I'm missing some behind the scenes workings of CS5/AS3, any reference to "_level#" is not AS3.  If you open the Flash section of your Publish Settings, what version of actionscript do you see specified in the dropdown selection?  If it is not AS3. make it so.

                                      • 16. Re: Loading multiple external images
                                        Ned Murphy Adobe Community Professional & MVP

                                        If the file I made for you did not work, it should.  So I have no explanation as to why it would not.  The only way I could review your file is if it is saved as a CS3 file.  With CS5 you can only save as far as CS4.