13 Replies Latest reply on May 7, 2008 1:38 PM by Scott_K

    Flash in Director 11 problem...

    Scott_K Level 1
      I have a flash applicaiton that initializes by reading in an XML file. It runs fine as a swf.
      but I inserted it as a swf in Director and it is flashing on the screen showing some kind of error is occuring.
      How do I get this to work? this is the only way I'll be able to use Director on this project as I need to control the play of Quicktime movies.
        • 1. Re: Flash in Director 11 problem...
          Scott_K Level 1
          This is the error in the Director message box:

          -- Error #2044 text=[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2035"]
          -- Error #2044 text=Error #2032
          -- Error #2044 text=Error #2032
          • 2. Re: Flash in Director 11 problem...
            robdillon Most Valuable Participant
            Which version of Flash and which version of AS? If you are trying to import an XML file then be sure that you link the .swf to the Director movie and not fully import it. The .swf must remain outside the Director movie so that it can get to the external xml file.
            • 3. Re: Flash in Director 11 problem...
              Scott_K Level 1
              Hi Rob,
              It seems importing it (AS3) into Director 11, the flash file cannot load the xml file, but when the same file is run in Flash, it can load the file. Is this a security limitation?
              You seem to be indicating that I could load, other than importing into the Director authoring environment, the flash file?
              I'm hitting with Director the same difficulties I remember so well. The Flash sprite cannot be referenced in the code, its functions cannot be reached by myFlash.myFunction() from within the Director timeline.
              I was thinking I could just import the XML files (they are local for this app), then feed them to the Flash XML object?
              • 4. Re: Flash in Director 11 problem...
                Level 7
                > It seems importing it (AS3) into Director 11, the flash file cannot load the
                > xml file, but when the same file is run in Flash, it can load the file. Is this
                > a security limitation?

                I think it's rather a limitation in the Flash Asset xtra insofar as it
                can't handle AS3 swfs
                • 5. Re: Flash in Director 11 problem...
                  Level 7
                  I don't know if this is your problem or not (it is likely at least part
                  of it), but Director can not handle AS3 very well (generally, it can't
                  handle it at all). Try using AS2. Sometimes that works... like Rob
                  said, though, keep it externally linked to Director.
                  • 6. Re: Flash in Director 11 problem...
                    Ex Malterra Level 1
                    quote:

                    Originally posted by: Rob Dillon
                    Which version of Flash and which version of AS? If you are trying to import an XML file then be sure that you link the .swf to the Director movie and not fully import it. The .swf must remain outside the Director movie so that it can get to the external xml file.


                    • 7. Re: Flash in Director 11 problem...
                      Ex Malterra Level 1
                      Sorry for the double post, some wierd snafu with my browser...

                      quote:

                      Originally posted by: Scott_K
                      I have a flash application that initializes by reading in an XML file.


                      Do you mean that XML.load() is called? Is the XML file local? It should work fine. Below are some code snips from a Flash CS3(AS2)/Director 11 hybrid piece I'm working on. It's for a projector that uses an imported Flash SWF that has a tree component in it to represent a selected XML file. Hopefully it'll help you figure out what's going on with your project.

                      quote:

                      Originally posted by: Rob Dillon
                      If you are trying to import an XML file then be sure that you link the SWF to the Director movie and not fully import it. The SWF must remain outside the Director movie so that it can get to the external XML file.


                      It's been my experience that that's not the case, either with MX 2004 or 11... at least with loading XML files. I'm unsure what's meant by "import", I've never done that. I'd be interested to know what the difference is, and why loading works and importing doesn't.

                      • 8. Re: Flash in Director 11 problem...
                        Scott_K Level 1
                        AS3 does not work with Director 11? That may hose it for me.

                        anyone have the reverse code snippet, that of Director calling down to the flash objects actionscript methods? Or is that not working because this is AS3?

                        I have thousands of lines of code written, all AS3 specific, so this flash app is not going AS2....
                        • 9. Re: Flash in Director 11 problem...
                          Scott_K Level 1
                          I made a test Flash swf, it has a function, CallTest("test").
                          Imported into Director11, on the timeline called
                          sprite("mySprite").CallTest("director test 1");

                          The error is:

                          Script error: Handler not defined
                          sprite("mySprite").CallTest("director test 1");
                          #CallTest


                          Am I supposed to do something in Director to expose the function in the Flash Object? Or is this just not working becuase this is AS3?


                          • 10. Re: Flash in Director 11 problem...
                            Level 7
                            Currently, Director can not communicate in any way with AS3. Most AS3
                            does not work at all in Director. And any of it that does work will not
                            communicate with Director. Until Adobe releases a patch or something to
                            add AS3 support, you can assume that it is not supported.
                            • 11. Re: Flash in Director 11 problem...
                              Scott_K Level 1
                              Ok, thank you Mike. Guess Director is not the way to go.
                              • 12. Re: Flash in Director 11 problem...
                                Level 7
                                If you didn't already, the Flash sprite has to be on stage, visible,
                                with the movie playing, and for at least one full frame cycle before you
                                can start talking with the swf.
                                • 13. Re: Flash in Director 11 problem...
                                  Scott_K Level 1
                                  yup, it is...