I need to create a number of layers in a for loop. This is what I've
been trying (with many variations):

  for (i=0; i<o.items.length; i=i+2){
   eval("i") = new DynLayer();
   linkItem = "<a href='" + o.items[i] + "'>" + o.items[i+1] + "</a>";
   eval("i").setHTML(linkItem);
   eval("i").setVisible(true);
   o.menuItems.addChild( eval("i") );
   o.menuItems.eval("i").setVisible(true);
  }

I get the error: "can't assign to a function" from the second line
above. I just want a group of layers created on the fly depending on
how many items are in the "items" array. I think I must be missing
something -- is this the wrong approach?

Thanks!
-Tom

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to