j0se
August 25th, 2003, 12:24 PM
hello
i have a child mc with a loadVars event that gets some text from a file and loads it into a text box.
the parent mc is called about_us
what i want to do is tell loadVars to look for a file of the same name as the parent clip (instead of hard-coding the name - so i can reuse it in other clips in the same project)
this is what i have at the moment:
.
.
.
// load data
myData.load("myFile.txt");
.
.
whereas i want something like:
mydata.load(parent.name + ".txt");
all the mc's ahve an instance name, and i can do:
trace(this);
which gives me _root.parentclipname.loadVars_mc
but i want to output the parent clip name
trace(parent) and other combinations don't work
can anybody help?:)
i have a child mc with a loadVars event that gets some text from a file and loads it into a text box.
the parent mc is called about_us
what i want to do is tell loadVars to look for a file of the same name as the parent clip (instead of hard-coding the name - so i can reuse it in other clips in the same project)
this is what i have at the moment:
.
.
.
// load data
myData.load("myFile.txt");
.
.
whereas i want something like:
mydata.load(parent.name + ".txt");
all the mc's ahve an instance name, and i can do:
trace(this);
which gives me _root.parentclipname.loadVars_mc
but i want to output the parent clip name
trace(parent) and other combinations don't work
can anybody help?:)