daking
04-24-2007, 09:54 PM
How do I iterate through all the sub instances of a movie clip with JSFL? In actionscript I'd do the following:
for (var subItem:String in _level0.mapHolder.map.pan.layerPark) {
var instance:Button = _level0.mapHolder.map.pan.layerPark[subItem];
trace(instance._name);
}
I need to extract an inline "onRollover" event definition on each button instance and do some string manipulation (e.g. on (rollOver) { action here.. }). Problem is that I can't do this runtime. There about around 100 button instances contained in the movieclip "layerPark" which I need to iterate through. Then for each button instance, I plan on outputting the onRollover function text.
Sorry for the newb question. Any help would be appreciated.
for (var subItem:String in _level0.mapHolder.map.pan.layerPark) {
var instance:Button = _level0.mapHolder.map.pan.layerPark[subItem];
trace(instance._name);
}
I need to extract an inline "onRollover" event definition on each button instance and do some string manipulation (e.g. on (rollOver) { action here.. }). Problem is that I can't do this runtime. There about around 100 button instances contained in the movieclip "layerPark" which I need to iterate through. Then for each button instance, I plan on outputting the onRollover function text.
Sorry for the newb question. Any help would be appreciated.