6 Replies Latest reply on Aug 4, 2006 10:07 AM by Newsgroup_User

    Having an argument with FSCommand.

    Tim Will Do It
      Well...I feel like I've graduated. I've been using Flash for a little while now and I'm learning a lot. I've been posting questions in the General Flash Discussion. Now I have an Actionscript question so I've moved up to this forum.

      Let me lay out the scenario and then explain what I'm trying to do.

      I'm creating a CD that will automatically launch my Flash presentation for prospects to view. I'm running it as a .swf file in the standalone Flash Player for a couple of reasons. One reason is that the Autorun will launch my presentation from an Internet URL and the browser won't run a .exe file.

      The Autorun feature of the PC will only launch executable programs. However, it won't let me use arguments, so I can't open Flashpla.exe <filename>.

      Here's how I propose to resolve the challenge. I will create a small Projector file to include on the CD, which I will open using Autorun. About the only thing the Projector file will do is to access the .swf file from the Internet and open it in the Flash standalone player.

      Using the FSCommand action with the exec command, I can open Flashpla.exe but I'm still having a problem loading the .swf file. It seems I can't use "Flashpla.exe <filename.swf> with the FSCommand exec command.

      Any thoughts or ideas? Thanx.
        • 1. Re: Having an argument with FSCommand.

          I'm actually having the same problem (adding an argument to the fscommand)
          i'm a little disappointed no one replied to your question, because i've looked all over the internet and haven't found much help.
          I have a partial solution (which might totally fix your problem)
          use another language (I'm using c++) to make a small .exe program that doesn't require aruguments. You could then use the shellExecute command (or any other command that runs an external application) to run flash player. Since ShellExecute can take arguments, you could open a specific file in flashplayer.
          unfortunately for me, this doesn't totally solve my problem (i'm trying to allow flash to save variable date to a .txt file)
          since the c++ file needs to know what data to save, my fscommand call needs to have arguments.

          Does anyone on the forum know how to add arguments to fscommand (or ExternalInterface.call)?
          • 2. Having an argument with FSCommand.
            I'm not entirely sure what you guys are having problems with, but I am doing something similar. Basically, I'm creating a Flash menu which will autorun when a user inserts a disk into their computer. But in order to do that, I created an exe using Visual Basic which has an ActiveX Flash component. You might find that something similar will work well. It's a standalone exe, so it should have no problems executing on any Windows system with Flash installed. It should also be able to load any movie, though that is more on the Visual Basic side of the coding than the Flash side. As for saving something to text files, I'm under the impression that Flash itself has a very limited capability for writing information to files. However, it should be able to send long, extended, fscommands to the "wrapping" Visual Basic exe. The exe can create the file and write out to it, while the Flash animation tells the exe what to write. You can include arguments to fscommand:

            fscommand("command", "arguments");

            But I don't know if this will help - or if it is even relevant ^^;.
            • 3. Re: Having an argument with FSCommand.
              jak418 Level 1
              the only problem is that to run fscommand, the "command" is "exec" and the argument is "whatever.exe"
              arguments to "whatever.exe" don't seem to be possible
              what would like to do is to add variables as arguments to the .exe, and then have the .exe save the variables in a .txt file, which flash can load using the loadVars class
              there must be some kind of syntax (like a "-" or "&") to add arguments to fscommand
              • 4. Having an argument with FSCommand.
                Anthop Level 1
                Does your Flash animation know the value of the variables? It is possible to run:

                fscommand("exec", "whatever.exe command_line_argument_1 argument_2");

                Alternatively, it is possible to write into your executable:

                fscommand("exec_$", "whatever.exe$argument_1$argument_2");

                where it is understood by your executable that the $ symbol is a delimiter between tokens in your string and that the first token is the executable while the following tokens are arguments. You would have to write the code to split the "argument" string, though.
                • 5. Re: Having an argument with FSCommand.
                  jak418 Level 1
                  I just found out (after hours of research) that for security reasons, flash mx and flash 8 disabled putting arguments into the fscommand function. apparently some people made a flash virus a while back using flash 5, so macromedia (or adobe?) disabled the save() command and putting arguments into fscommand.
                  So much for that...
                  • 6. Re: Having an argument with FSCommand.
                    Level 7
                    You can do this by using Jugglor.

                    Read this



                    FlashJester Support Team
                    e. - support@flashjester.com
                    w. - http://www.flashjester.com

                    There is a very fine line between "hobby" and
                    "mental illness."