4 Replies Latest reply on Sep 26, 2011 5:43 PM by lingouser951a

    SWF linked to FLA

    lingouser951a

      Hello,

       

      I'm using Director 11.5 and I have a movie which uses several FLA files. For performance, I've imbedded the FLA files in a SWF file and then imported the SWF into Director. If I put the source FLA file in the same director as my Director movie, everything works fine. However, it I put them in a subdirectory it stops working. All I get is a black screen.

       

      I've tried setting the searchpathlist and appending my FLA directory but it still doesn't work. Does anyone have any ideas?

       

      Worst case, I could put everything in the root directory but I'd like to keep things more organized than that.

       

      Thanks in advance for your help!

       

      Todd

        • 1. Re: SWF linked to FLA
          Wolfgang Herold Level 2

          the path of the FLA is not related to Director, it is related to the SWF. If you embed the fla's fully into the SWF's (not linked) you, you do not need the sources.

          1 person found this helpful
          • 2. Re: SWF linked to FLA
            Sean_Wilson Adobe Community Professional

            If you embed the fla's fully into the SWF's (not linked) you, you do not need the sources.

            True, unless you double-click the Flash SWF cast member and Director tries to open the FLA for editing.

            1 person found this helpful
            • 3. Re: SWF linked to FLA
              Adam-C

              I find that the best way to work with SWFs inside Director whilst retaining links to the source FLA files is as follows:

               

              - Import the SWF into Director. Fully embed smaller SWFs, but if it's a large FLA you may want to consider linking to the external SWF file (making sure it's located in a the same path as your Director movie, or a subpath of the movie).

               

              - In Director, select the new SWF cast member and select the Flash tab on the member inspector. Here you can tell Director where the source FLA is stored by clicking the browse button on the lower portion of the tab - the FLA can be located anywhere on your filesystem (I normally keep them external to the Director movie's path structure so that there's no risk of accidentally including them in the published package).

               

              - To make changes to your SWF either double-click its member (as Sean_Wilson points out), or select the member and press the "Edit" button in the member inspector. Either will cause the FLA to open in Flash, and for Director to be "blocked" by a modal dialog box that says "Editing in Flash etc.etc."

               

              - In Flash you can make your changes and then hit the "Done" button (located below the timeline in CS4 - don't know where it is in CS5). When you press "Done" several things will happen: The changes to the FLA will be saved and a new SWF will be produced that will automatically replace the one embedded in (or linked to) Director.

               

              - If you want to cancel the changes you make to the FLA then just close the FLA (choosing not to save the changes), return to Director and click "Cancel" on the "Editing in Flash etc" dialog box.

               

              As a workflow it works perfectly, and there's no need to embed FLAs inside a SWF.

               

              As-for losing links to your SWFs - this won't happen if you fully embed them in Director (rather than linking to them), and this is the method I favour for smaller SWFs. If you are linking to them rather than embedding them, then you should update their links in a prepareMovie or startMovie movie script like this:

               

              on startMovie

                   --determine the host's native path separator character and assign it to pathSep variable

                   if _system.environmentPropList.platform contains "mac" then

                        set pathSep = ":"

                   else

                        set pathSep = "\"

                   end if

                   --update the filename references for linked members...

                   member("MySWF_1").filename = _movie.path & "swfFolder" & pathSep & "MySWF_1.swf"

                   member("MySWF_2").filename = _movie.path & "swfFolder" & pathSep & "MySWF_2.swf"

                   --etc.

              end

               

              This way the members will always point the correct SWF files, no matter where you move the program folder, or if you rename of folder or whatever. Whether this will fix the problem when the SWF contains embedded FLAs I don't know - I've never tried working that way.

               

              Finally, if you embed your SWFs into Director (rather than linking to them) then it can sometimes be a good idea to place their members into a linked external cast, thereby giving you an easily reusable library of Flash-based assets (which is possibly what you are trying to do by embedding FLAs into a SWF). This also keeps your SWFs external to your main movie, resulting in a smaller projector.

               

              Hope that helps

              • 4. Re: SWF linked to FLA
                lingouser951a Level 1

                Thanks Adam,

                 

                Setting the filename worked great! I appreciate everyone's help.

                 

                Todd