Hej!
I’ve got a mc which should send its own name to a combobox thru a variable. The Code for the MC looks like this:
onClipEvent (load) {
tellTarget (this._parent.color_combo) {
myTarget=this._name;
trace(myTarget);
}
}
and for the combobox:
on (change) {
myColor = new Color(this._parent.myTarget.fill_mc);
myColor.setRGB(this.value);
trace(myTarget);
delete farg;
}
The problem is that the line myColor = new Color(this…);
doesnt work but i get the same values from both trace functions.
Cant i use the variable myTarget in the path in the combobox?
If i make the path static and only for one MC, (myColor = new Color(this._parent.myMC.fill_mc); then it works but i will duplicate my mc and the combobox should work for all mc:s then the path has to be dynamic.
How should I solv this?