13 Replies Latest reply on Dec 10, 2007 4:58 AM by JcFx.Eu

    Sudden fscommand failure

    JcFx.Eu Level 1
      I have a complex application, with several different child movies loading into a parent, some of those children in turn loading further children. It's a learning application, and uses fscommand to send messages to vbscript, which then communicates with a java scorm api.

      This works fine until a particular child movie (several links down a chain but not deeper than a number of others) loads in, when fscommand suddenly stops working. I've tested this using a simple javascript trace function to step through the various functions - they all operate fine up to and including the function which loads this particular child movie, when fscommand suddenly goes dead and no further calls to it, application-wide, will work.

      This particular child movie contains a complex AS2 class, but so do several others which don't cause an problem. This child movie is loaded in using a moviecliploader, but so are several others which don't cause a problem. The behaviour seems limited to IE (which I have to use). ExternalInterface works in firefox because I can run firebug through and beyond the offending function. I can't test the fscommand calls though because the scorm api code uses vbscript.

      I appreciate there's not enough info here for anyone to diagnose this directly but has anyone experienced anything like this, and does anyone even know what it *might* be? What could this child movie do that would disable fscommand all across the application ?

      Many thanks in advance for any help.

      Jude Fisher / JcFx.Eu
        • 1. Re: Sudden fscommand failure
          LukasCanoe
          Your path to child movie is probably wrong try having all files in same directory.
          I have run into this issue many times. Always load movies as if you where trying to load them from main movie. When you load movies into another all movie still think they are in the directory in which the main movie is located. So if you load a movie from a subfolder, that then tries to load another movie in the same subfolder, you would have to use a similar path as you would use when loading from main movie.
          Hopefully this help and I haven't made a idiot of myself
          matt
          • 2. Re: Sudden fscommand failure
            JcFx.Eu Level 1
            Matt,

            Thanks for your reply. You certainly haven't made an idiot of yourself (any genuine attempt to help is appreciated) but I don't think that is the problem.

            In the first place the movies in question are together in the same folder, and in the second place the movie loads perfectly correctly and every other aspect of the application continutes to execute correctly, only fscommand() suddenly goes awol.

            Thanks again - and let me know if I've misunderstood your point.

            Jude Fisher / JcFx.Eu
            • 3. Re: Sudden fscommand failure
              LukasCanoe Level 1
              The only other thing i can think of is a problem with the security settings. try running app on different computers to see if same issue arises. I know vista can cause this to happen too because of the User Account control setting. Are you encapulating program in a exe and if so what application are you using to do so. Swf studio or Mprojector , If so use there execution commands instead of fscommand.
              • 4. Re: Sudden fscommand failure
                nITiNkIlLeRmEeRuT Level 1
                Please check for the parent movie publish setting for flash version and the movie which is loaded in the parent movie.
                The child movie flash version should not be greater than the parent movie.
                • 5. Sudden fscommand failure
                  JcFx.Eu Level 1
                  Thanks for the reply.

                  In fact the sequence is this:

                  Top Movie > Movie 1 > Movie 2 > Movie 3

                  Top Movie is published to fp6 / AS1, all subsequent movies are published to fp8 / AS2. It doesn't break when Movie 1 (the first AS2 movie) is loaded though, only when the second AS2 movie (#2) is loaded in.

                  I've never tried loading a movie published for AS2 into one published for AS1 before (Top Movie in this case is existing content which I have to integrate with) - could that be causing the problem and why would it break when the second movie is loaded in, and not the first?

                  I'm going to try and publish the top movie to AS2 (difficult because the original dev used some variables that are reserved words in AS2) but if you could explain why this might be happening it would be great.

                  Thanks again.

                  Jude Fisher / JcFx.Eu
                  • 6. Re: Sudden fscommand failure
                    nITiNkIlLeRmEeRuT Level 1
                    Yes this is the issue. Either publish Top level movie in the same version as of the child movies or vice versa...
                    • 7. Re: Sudden fscommand failure
                      JcFx.Eu Level 1
                      Thanks for your help.

                      Unfortunately that is not the problem in this instance.

                      I have changed the publish settings so all movies are publishing to f8 / AS2 and the problem remains the same - when this specific sub-movie loads in, fscommand breaks everywhere.

                      Thanks again - any more suggestions would be very welcome.

                      Jude Fisher / JcFx.Eu
                      • 8. Re: Sudden fscommand failure
                        nITiNkIlLeRmEeRuT Level 1
                        I have faced this issue several time even few hours before and this is the solution which worked for me every time.
                        If possible upload the files so I can have a look at them otherwise I don't think I will be able to help.
                        • 9. Re: Sudden fscommand failure
                          JcFx.Eu Level 1
                          Yes that certainly seemed like a potential solution but I've double-checked that every file in the chain is now publishing to f8 / AS2 and the same problem remains. The fact that some AS2 files loaded into an AS1 parent without breaking fscommand and then just this one file loaded in and broke everything also suggests that another problem may be the cause.

                          Unfortunately this is for a blue chip and I'm under a strict NDA so I can't upload files. I've worked round the issue now by putting the functionality into a separate page and using LoadVars to call it - inelegant but it works and it is robust so that will have to do for now.

                          Thanks again for your help.

                          Jude Fisher / JcFx.Eu
                          • 10. Re: Sudden fscommand failure
                            Greg Dove Level 4
                            Are any of your child movies running code that references "_root" intending for _root to be within their original scope?

                            if so you might need to use _lockroot=true.
                            check this:
                            http://livedocs.adobe.com/flash/9.0/main/00001937.html#wp388646
                            • 11. Re: Sudden fscommand failure
                              JcFx.Eu Level 1
                              Thanks for your reply.

                              No, I always use _lockroot when I load a sub-movie and only very rarely use _root. references in any case.

                              Not sure why this would break fscommand across the board even if it were so?

                              Thanks again.

                              Jude Fisher / JcFx.Eu
                              • 12. Sudden fscommand failure
                                Greg Dove Level 4
                                It was a long shot (and you are wise not to be using _root). Its not directly related to breaking fscommand - that wasn't what I was thinking. But I wondered whether you might be calling some function at _root that did the fscommand stuff.

                                But .... if you are publishing for fp8 now... then you could use ExternalInterface to talk with your javascript. Its supposed to be compatible with more browers. And its easier. I don't know if it will have any bearing on your problem though. FYI September stats had fp8 at 99% penetration... so its basically the standard for regular browsers unless a client has strong requirements for earlier player versions.
                                (FP9 wasn't far behind at around 94% from memory)
                                • 13. Re: Sudden fscommand failure
                                  JcFx.Eu Level 1
                                  ExternalInterface breaks in exactly the same way, at exactly the same point, so it's something that seems to disable the browser <> active x object communications. The same code runs without a hitch in firefox but I can't use firefox in the live environment so that won't fly.

                                  I would certainly use ExternalInterface in new code btw - I just have a bunch of f6/as1 legacy code that uses fscommand (complete with VbScript in the page that handles the call and passes it on to javascript) and some of the older .swfs can't be replaced in this build (not my choice this but the client's).

                                  This is on an intranet btw so everyone is IE6 and, as of this month, fp8, regardless of what the movies are published to.

                                  I would use fp9 and AS3 for new development now if given the choice but most of the big companies I code for are still, for some reason, stuck on f7 - they all have strict requirements documents and these don't get revised just for a single project, more's the pity. Some may have decided that with AS3 in the offing it wasn't worth stepping through f8 which might be a good call if you have tens of thousands of workstations to roll an update out to - I just hope they make the move to f9 sooner rather than later.

                                  Thanks again to everyone who has tried to help here. My ugly workaround is, well, working around, and today is deadline day so I'm going to stop watching this thread.

                                  Jude Fisher / JcFx.Eu