simple xml actionscript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfsiddiq
    New Member
    • Aug 2007
    • 17

    simple xml actionscript

    HI

    I have a form that i m creating dynamically using xml .But i need to add labels on each formitem after all formitems are created.So i store each formItem in an array.After the form is created i tried adding labels to the form using the following code:

    var i:int=0;
    for each(var n:XML in externalXML..so meObject.item) {


    if(n.hasOwnProp erty('label'))
    {
    formLabels[i++].label=n.label

    }

    }

    though it creates the formitems with corresponding labels it gives errors on the way like this
    TypeError: Error #1010: A term is undefined and has no properties.
    Can anyone explain why i am getting this error
Working...