Experts - I am looping through an array of movie clip names in actionscript 2.0 and need to figure out a way to pass a var to the onPress function. I'm dealing with a scope issue, but am not sure how to fix it.
I have the following code on the first frame of my timeline. The issue is, when the onPress event is fired, counties[i] is undefined. Is there a way I can pass the array variable into the onPress event function without loosing scope?
Thank you for your help!
counties = testVar1.split(',');
for (var i = 0; i < counties.length; i++)
var o = eval(counties[i]);
o._alpha = 70;
o.onPress = function()
getURL("#" + counties[i]);