home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2009 May / MAC_easy_05_2009.iso / Video-Tutorial / start.swf / scripts / frame_27 / DoAction.as
Encoding:
Text File  |  2009-03-18  |  1.3 KB  |  60 lines

  1. function decodeUnixPath(s)
  2. {
  3.    originale = new Array("\\");
  4.    zeichen = "/";
  5.    x = 0;
  6.    while(x < originale.length)
  7.    {
  8.       while(s.indexOf(originale[x]) != -1)
  9.       {
  10.          pos = s.indexOf(originale[x]);
  11.          s = s.substring(0,pos) + zeichen.charAt(x) + s.substring(pos + originale[x].length,s.length);
  12.       }
  13.       x++;
  14.    }
  15.    return s;
  16. }
  17. if(client_os == "Windows")
  18. {
  19.    mdm.Forms.SplashForm.callFunction("output","Decoding..","");
  20. }
  21. if(useFSP_path == undefined)
  22. {
  23.    gotoAndPlay(5);
  24. }
  25. else if(useFSP_path == "true")
  26. {
  27.    if(client_os == "Windows")
  28.    {
  29.       fsp_path = appdir;
  30.       test_op.text += fsp_path + " Line 26\n";
  31.    }
  32.    else if(appdir_osx == undefined)
  33.    {
  34.       test_op.text += appdir_osx + "Line 31 \n";
  35.       gotoAndPlay(5);
  36.    }
  37.    else if(appdir_osx.indexOf("undefined/") == -1)
  38.    {
  39.       if(appdir_osx.indexOf("\\") == -1)
  40.       {
  41.          fsp_path = appdir_osx;
  42.          test_op.text += fsp_path + " without decoding Line 38\n";
  43.       }
  44.       else
  45.       {
  46.          fsp_path = decodeUnixPath(appdir_osx);
  47.          test_op.text += fsp_path + " after decoding Line 41\n";
  48.       }
  49.    }
  50.    else
  51.    {
  52.       test_op.text += appdir_osx + " Line \n";
  53.       gotoAndPlay(3);
  54.    }
  55. }
  56. else
  57. {
  58.    fsp_path = "";
  59. }
  60.