5 Replies Latest reply on Jan 13, 2011 1:17 PM by kglad

    Projector as program launcher problem

    TTI-JDR

      Greetings all!

       

      I'm working on a company project that's incorporating a Flash projector as a launcher/installer. The idea is that a CD-Rom will be placed in your drive, based upon a button click, the projector will determine whether or not a specific program is installed. If the program is installed, then the projector moves onto the next step but if the program is not installed, a 3rd party installer is supposed to launch first to install the necessary program that the included files will need to open up in.

       

      I'm not a high level coder and have been having some trouble finding the right code solution. I'm using AS3 and the final product needs to run in projector.exe form.

       

      Here's the code that's been written so far:

       

      import flash.system.fscommand;

       


      var depoInstalled:Boolean = flash.filesystem.File.exists("C:\\Program Files\\Digital CAT\\audiOdepo.exe");

       


      test_btn.addEventListener(MouseEvent.MOUSE_DOWN,testFunc);

       

      function testFunc(event:MouseEvent):void {
      trace('installer');
      if (depoInstalled == false){
          flash.system.fscommand("Exec","test.exe");
          }
      else{
          flash.system.fscommand("Exec","audiodir.bat");
      }
      }

       

       

      Here's the error code I get that I am having trouble resolving:

       

      1120: Access of undefined property flash

       

       

       


      I can't seem to get the above variable to work but I have tested the rest of the code components seperately and everything else seems to work. If anyone has any suggestions, it would be greatly appreciated.


      Thanks for taking the time to take a look at this post!