1 Reply Latest reply on Aug 16, 2006 6:48 PM by Damir.Mestrovic

    Problem converting project from Flash5 to MX

    Damir.Mestrovic
      Hi,
      I'm working on an old project, dating from Flash 5, and after I do redesign in Flash MX and export movie as Flash 6 some functions are not working any more. I have HI SCORE results that should be exported as a TXT file, and reviewed if needed. Problem is that in newer version of Flash Player that doesn't work. I'm not AS expert, so any help is welcome. Here is the code:

      AS in AS layer:

      stop();
      itemsReset();
      intResultTest = Math.round(100*trueBox/aQuestions.length);
      myDate = new Date();
      dateTextField = ((mydate.getMonth()+1)+"/"+myDate.getDate()+"/"+mydate.getFullYear());
      goalBox = trueBox+" out of "+aQuestions.length+"\n";
      goalBox = goalBox+intResultTest+"%"+"\n";
      if (Flag == 1) {
      TestTime = "...time is not important, only knowledge is important!";
      }
      // end if
      goalBox = goalBox+"and it took: "+TestTime;
      warningMsg2 = "To save the result\n enter your name and click SAVE button";
      saveCount = 0;


      AS on SAVE button:

      on (release) {
      if (userName == "" || userName == null) {
      warningMsg2 = "Enter your name, please";
      } else if (saveCount == 0) {
      output = dateTextField+"\tGK_Test\t\t"+intResultTest+"%\t"+TestTime2+"\t"+userName;
      unit_name = "dt_stat";
      output_file = "command.com\t/c\techo\t"+output+">>C:\\"+unit_name+".txt";
      output_file2 = "cmd.com\t/c\techo\t"+output+">>C:\\"+unit_name+".txt";
      getURL("FSCommand:exec", output_file);
      getURL("FSCommand:exec", output_file2);
      warningMsg2 = "saved in C:\\dt_stat.txt,\nclick READ to watch it";
      ++saveCount;
      } else {
      warningMsg2 = "click OK to continue...";
      }
      }


      THNX