JethroGillgren
09-14-2008, 02:34 PM
Hi, Thanks ahead for any help. I'm learning so please put up with my stupid questions.
Basically I've got a load of Arrays, and i do a function called LoadImageArray, passing in the array, and it's name as a string. a function will run, and inside there i want to update the array. I don't know what the array name will be, so how do i change the array using the "thisName" argument? (which has the array name inside)
Just saying thisName[i] etc... is referencing the argument (I think they're called arguments?) and I don't know how to make it reference the Array of the same name.
var imageArray0:Array = [];
LoadImageArray(imageArray0, "imageArray0")
function LoadImageArray(thisArray:Array, thisName:String) :void {
//Unimportant Stuff Cut Out
//Below function will run...
function onAllLoaded(done:Event) :void {
//Unimportant Stuff Cut Out
//Here I want to access the Array (for this example it is imageArray0) that has been passed in under the argument "thisName".
}
}
}
Thanks for any help
Basically I've got a load of Arrays, and i do a function called LoadImageArray, passing in the array, and it's name as a string. a function will run, and inside there i want to update the array. I don't know what the array name will be, so how do i change the array using the "thisName" argument? (which has the array name inside)
Just saying thisName[i] etc... is referencing the argument (I think they're called arguments?) and I don't know how to make it reference the Array of the same name.
var imageArray0:Array = [];
LoadImageArray(imageArray0, "imageArray0")
function LoadImageArray(thisArray:Array, thisName:String) :void {
//Unimportant Stuff Cut Out
//Below function will run...
function onAllLoaded(done:Event) :void {
//Unimportant Stuff Cut Out
//Here I want to access the Array (for this example it is imageArray0) that has been passed in under the argument "thisName".
}
}
}
Thanks for any help