2 Replies Latest reply on Feb 20, 2008 10:04 AM by Robthemanbob

    Flash to check for existing file

    Robthemanbob
      I am very new to flash action scripting and i used a tutorial to help write this code however I need flash to check for an exisiting file and if it does not exist have it skip to the next number.

      here is a copy of the script that I am writing. Any help would be greatly apprecaited.

      this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
      this.createEmptyMovieClip("buttons_mc", this.getNextHighestDepth());

      buttons_mc.attachMovie("previous","prev_mc",buttons_mc.getNextHighestDepth());
      buttons_mc.attachMovie("next","next_mc",buttons_mc.getNextHighestDepth());
      container_mc.loadMovie("images/image1.jpg");
      buttons_mc.next_mc._x = Stage.width - buttons_mc.next_mc._width - 10;
      buttons_mc.next_mc._y = 10;
      buttons_mc.prev_mc._x = 10;
      buttons_mc.prev_mc._y = 10;
      i=0;

      buttons_mc.next_mc.onRelease = function () {
      i=i+1;
      if ( i == 25 ){ i=1 };
      container_mc.loadMovie("images/image" + i + ".jpg");

      }