k - sorry for spamming this board all day but it's all been from the same problem

i've boiled the whole thing down to this:

how do i pass a variable to an onLoad() function?

here is my script
function loadDescriptions() {
        for (var i=0; i<_root.menuItems_array.length;i++) {
                var thisTextLoadVars = new LoadVars();
                thisTextLoadVars.onLoad = function(success) {
                        trace (_root.menuItems_array[i]);
                };
                var thisDoc = _root.menuItems_array[i];
                trace ("thisDoc: "+thisDoc);
                var textDoc = _root.menu[thisDoc].description;
                thisTextLoadVars.load(textDoc);
        }
}

the trace in the the onLoad function returns "undefined". Can anyone tell me how to get around this please?

thanks
alz
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to