3 Replies Latest reply on Feb 22, 2008 6:02 AM by ooba

    Checking if file exists

    jak9942 Level 1
      What script could i use to check if a .txt file exists.
        • 1. Re: Checking if file exists
          ooba Level 1
          I trimmed down some code but it is such a small window to edit in.
          • 2. Re: Checking if file exists
            jak9942 Level 1
            I dont fully understand this. Where do i insert the URL i need to check?
            • 3. Re: Checking if file exists
              ooba Level 1
              // Here is the general layout of functions used for loading data. Note: You will need to read up on this a bit in order to see how the various functions such as MCLiListener.onLoadProgress is called.

              // The event loader that will listen for events
              var MCLiListener:Object = new Object();
              var MCLi:MovieClipLoader = new MovieClipLoader();

              MCLiListener.onLoadProgress = function(param_target, param_bytesLoaded, param_bytesTotal) {...}

              MCLiListener.onLoadComplete = function(param_mc:MovieClip) {...}

              MCLiListener.onLoadInit = function(param_mc:MovieClip) {...}

              MCLiListener.onLoadStart = function(param_mc:MovieClip) {...}

              MCLiListener.onLoadError = function(param_mc:MovieClip, e:String) {...}

              // container_mc is the variable reference to some already existing MovieClip that is on the stage.
              MCLi.loadClip("FilePath", container_mc);