13 Replies Latest reply on May 28, 2007 11:37 AM by kglad

    loadVariables prob

    gandalf458 Level 1
      I have tried replacing some code

      var image0title:String = "Summer salad";
      var image0desc:String = "Butter lettuce with apples, blood orange segments, gorgonzola, and raspberry vinaigrette.";

      var image1title:String = "Chinese Noodle Salad";
      var image1desc:String = "Rice noodles with garlic sauce, shitake mushrooms, scallions, and bok choy.";

      etc

      with

      loadVariables("foodMenu.txt",this);

      where foodMenu.txt contains

      image0title=Summer salad
      &image0desc=Butter lettuce with apples, blood orange segments, gorgonzola, and raspberry vinaigrette

      &image1title=Chinese Noodle Salad
      &image1desc=Rice noodles with garlic sauce, shitake mushrooms, scallions, and bok choy

      etc

      It works fine for the 2nd and subsequent runs but the first time both displays are undefined.

      Any ideas what I've done wrong? Thanks