Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object creation in flash

Status
Not open for further replies.

PalOwl

Programmer
Oct 30, 2001
6
0
0
GB
I'm creating objects from an XML file (code below)

my problem is: How do I evaluate "level" and "parent" so that they are seen as objects ? I have tried eval(parent) but with no success
This is the call with xml (variables are dynamic)

level = new mMenu(name,url,parent); # as is

This would be the code without xml
tA = new mMenu("Alpha","","");
dLevel = new mMenu("myname","
tooltip = rootChild.firstChild.childNodes.childNodes.toString();
tooltip = urlDecode(tooltip);
level = rootChild.firstChild.childNodes.attributes.level;
name = String(rootChild.firstChild.childNodes.attributes.name);
url = String(rootChild.firstChild.childNodes.attributes.url);
parent = rootChild.firstChild.childNodes.attributes.parent;

level = new mMenu(name,url,parent);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top