5 Replies Latest reply on Jul 23, 2009 7:32 AM by Ned Murphy

    can swf reference images?

    æroerin

      I'm trying to create a swf so it always pulls images from a folder (e.g., containing image1.jpg, image2.jpg, etc), so if someone needs to easily swap out images they can do it by simply replacing image1.jpg. Is this possible?

        • 1. Re: can swf reference images?
          Ned Murphy Adobe Community Professional & MVP

          Yes, it is one common approach to allowing someone to have control content in their web site.  You would need to create the space for the image and then have code that loads the image when the file starts or when the section is entered.  That code will depend on what version of actionscript you plan to use.  In AS2 the options include using loadMovie or the MovieClipLoader.loadClip method, while in AS3 you would use the Loader class

          1 person found this helpful
          • 2. Re: can swf reference images?
            æroerin Level 1

            thank you! one other thing; what if people wanted to do the same thing but with live text too?

            • 3. Re: can swf reference images?
              Ned Murphy Adobe Community Professional & MVP

              The same deal, sort of.  A popular way of managing content in a Flash site is to use an XML file to define content.  If you take that approach, then you could take another approach for the image change, wherein you supply the name of the image file in the xml file.  So you don't need to revise the same image file, you can change the file to a different one.  But that may be confusing you for the moment the way I explained it.

               

              An XML file is simply a text file that is formatted a particular way (similar to html), where you use tags to identify different elements.  This file can be edited by anyone that has Notepad or whatever simple ascii editor is available to them.

               

              What you should do is search Google for "AS# XML tutorial", replacing the # with whatever version of actionscript you'll be using.  gotoandlearn.com has some good tutorials, and I know one of them demonstrates how to use AS3 with XML.

              • 4. Re: can swf reference images?
                æroerin Level 1

                thank you so much!!

                • 5. Re: can swf reference images?
                  Ned Murphy Adobe Community Professional & MVP

                  You're welcome