I have the following code, which resides, in the timeline, at: _root.myLoader.theLoader.control:
var loadImages:LoadVars = new LoadVars();
loadImages.onLoad = function() {
if (this.totalImages != undefined) {
imagesToLoad = new Array();
for (var i = 0; i < this.totalImages; i++) {
imagesToLoad[i] = this["img"+i];
}
_root.myLoader.theLoader.control["cProto"+n].onRelease = function(){
_root.myLoader.theLoader.revolver.test.text = imagesToLoad[n];
}
}
}
var imagesToLoad:Array;
the dynamic text field "test" returns: "undefined" instead of the value of imagesToLoad[n].
Obviously my reference to imageToLoad[n] is not right. I don't understand from where I should target
that variable from within the onRelease function, so that the text field gets it in its own timeline.
I tried to reference it absolutely, e.g:
_root.myLoader.theLoader.revolver.test.text = _root.myLoader.theLoader.control.imagesToLoad[n];
But this does not work either.
I know it's guess work for you to tell what should be the actual path, but what I don't understand
is how to think of the actual path in this situation.
Everything works otherwise (that is, imagesToLoad is succesfully created as an array and contains
the right things). The only thing is I don't understand how to target the values of the array so
that they are passed to another timeline.
I hope you can help!
--
seb ( ---@webtrans1.com)
http://webtrans1.com | high-end web design