1 Reply Latest reply on Jul 22, 2009 4:31 AM by keithwoods

    Strange Error coming up??? 1104: invalid xml name

    keithwoods

      his error pops up when the 'for' loop below runs....

      ActionScript Code:
      1104: invalid xml name


      Very strange as this part of my code isn't dealing with XML yet?! The error doesn't appear when I comment out the two 'else if' statements, so there's something wrong with that bit of the coding but I really can't see what?!

      ActionScript Code:
      var xPos = 210;
                  var yPos = 105;
                
                  // zone creation and add to stage
                  for (var i:uint = 0; i<=8; i++)
                  {
                      zone[i] = new Zone();              
                      //zone[i].x = xPos;
                      zone[i].y = yPos;
                    
                      if (i <= 2)
                      {
                          zone[i].x = xPos;
                          xPos += 305;
                      }
                      else if (i >= 3 && <= 5)
                      {
                          xPos = 210;
                          zone[i].x = xPos;
                          zone[i].y = yPos + 155;
                          xPos += 305;
                      }
                      else if (i >= 6 && <= 8)
                      {
                          xPos = 210;
                          zone[i].x = xPos;
                          zone[i].y = yPos + 155;
                          xPos += 305;
                      }
                    
                      zone[i].name = "zone[" + i + "]";
                      stage.addChild(zone[i]);
                      trace(zone[i].name);
                    
                  }