Weird dynamic names

I have a for statement, using an incrementing variable “a.” A dynamic amount of herbs are generated, so here is the for statement.


  for(a=1; a<_global.herbAmount+1; a++) {
   var herbMC = _root["herb"+a];
   trace(herbMC);
  }

When I trace “a,” it traces 1, 2, 3 or however many numbers there are up to the global herbAmount number.

When I trace _root[“herb”], _level0.herb pops out. When I add “a” onto _root[“herb”], undefined is traced…why?