jockmahon01
asked on
replacing eval
i want to access a element of a object using the name, i original taught that eval would do the job but its been depricated so adobe suggent using syntax this['blah' + i ]
i have tried this but it aint working
trace(i ) // is equal to name
trace( printLabelArray[pi].dispen singItemPr intElement drug.templ ateElement Text.text) // prints John
trace( this["printLabelArray[pi]. dispensing ItemPrintE lement"+i] ) // i get undefined here
trace( this["printLabelArray[pi]. dispensing ItemPrintE lement"+i+ ".template ElementTex t.text"] ) // and here
i have tried this but it aint working
trace(i ) // is equal to name
trace( printLabelArray[pi].dispen
trace( this["printLabelArray[pi].
trace( this["printLabelArray[pi].
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.