2 Replies Latest reply on Oct 10, 2007 1:00 AM by RichardHz



      The following sample code yealds duplicate definition warnings on the second "for each" statement. I thought the scope of the
      variable was restricted to the "for each" loop, is this not the case?

      Thanks in advance
      Richard Hernandez
      private function resultHandler(event:Event):void
      var showDir:String;
      var result:XML = new XML(event.target.data);
      _slidesArray = new Array();

      for each (var element:XML in result..location)
      showDir= element.@label;

      for each (var element:XML in result..slideshow)
      _slidesArray.push(showDir + "/"+ element.@label);
      _imageArray.addItem(new ImageHolder());
      _slidesReady = true;