4 Replies Latest reply on Apr 16, 2011 1:28 PM by R_Bennett

    Passing parameters to external source


      First off, I'm new to Flash, so hopefully I'm in the right spot and state things correctly. I'm trying to have Flash execute a file, and I can get FSCOMMAND to work. Sort of. While I can use it to run a single batch file, what I really need to do is to pass a parameter from within Flash to the item being executed. I'm currently using Flash to allow a user to select some items, and I need to pass that selection out of it in order to kick off some other processes (Flash is basically just my GUI interface right now until I learn more about how to do things in it).


      I don't care if it's a batch file or JavaScript or anything that's not uber complex (so no .NET or C++). I just need to find something that we can run internally for our company (either from an .HTML or a .EXE file output from Flash - not too picky there either).


      Ideas? Suggestions?



        • 2. Re: Passing parameters to external source
          R_Bennett Level 1

          Thanks for the post. The FSCFIXED item sounds like it would fit the bill and solve my problem. Unfortunately, when I tried emailing DinoRoger using the address in the post, it wouldn't go through. And the system wouldn't let a personal message via the Adobe forum go through either. So... Anyone happen to have a copy of the .EXE, or another solution/idea I could try?



          • 3. Re: Passing parameters to external source
            kglad Adobe Community Professional & MVP



            p.s.  please mark helpful/correct answers.

            1 person found this helpful
            • 4. Re: Passing parameters to external source
              R_Bennett Level 1

              kglad, thanks for the link. I went a different route and think I've got things working, but if not I plan to drop back and use the .EXE you mentioned. Since we're only using this internally, and not serving it from a website, this my current solution:


              1. Within the Flash project, make sure to import the ExternalInterface:
              import flash.external.ExternalInterface;
              2. Within the Flash project, add the line to call the JavaScript function:
              ExternalInterface.call("showMessage","Hello","This is my message");
              3. Within the Flash project, Publish it as .HTML
              4. Within the .HTML file, add the JavaScript function to be called (it can go within the <HEAD> tag):

              <script type="text/javascript">
              function showMessage (strGreeting, strMessage){
              alert(strGreeting + "\n\n" + strMessage)
              5. Within the .HTML file, save the changes, and then change the .HTML extension of the file to .HTA
              6. Test to see if things work as expected