2 Replies Latest reply on Jul 25, 2008 4:18 AM by Newsgroup_User

    check file availablity

    Safir187
      i need a code snippet.
      i wrote this code but it does not work. its my first time:

      on prepareMovie()
      objFileio = new xtra("fileio")
      objFileio.openFile("@\test.txt",1)
      if (objFileio.status=ERROR) then
      exitTheProgram()
      else
      Continue()
      end if
      end
        • 1. Re: check file availablity
          Safir187 Level 1
          my script is done and works now,
          i got an other problem.
          it works in the test but when i publish my project it gives a "Script error" eroor

          on prepareMovie()
          set fileInstance = new (xtra "FileIO")
          openFile (fileInstance, _movie.path&"test.txt", 1)
          set errorCode = status(fileInstance)
          if (errorCode<>0) then
          quit()
          end if
          end
          • 2. Re: check file availablity
            Level 7
            Safir187 wrote:
            > my script is done and works now,
            > i got an other problem.
            > it works in the test but when i publish my project it gives a "Script
            > error" eroor

            That usually indicates that you've forgotten to include an xtra, in this
            case probably the fileIO xtra.

            Andrew