Make string of MCs invisible/visible...
I have a map of states state when a particular state is clicked on, the fla centers on and zooms to that state. When you click on a state a unique ID is pulled from an xml. Using this ID, I can then call all the counties that are part of this state through the county's xml which is also loaded on my stage.
For example if I click on Arizona, it zooms and I get a trace of all the instance names of the counties within Arizona.
//call all instance names of Arizona counties
cldcnfips=(cntXml.Records.Record.(STATE_FIPS==cldstfips).afips.children());
trace(cldcnfips);
//The trace looks like this
a04001a04003a04005a04007a04009a04011a04012a04013a04015a04017a04019a04021a04023a04025a04027
//where "a" is the first character in each county's instance name
One of my first lines of code makes my counties invisible.
//dont show the counties yet
this.cnt.all_cnt.visible=false;
What I'd like to do is make just the called state's counties visible on zoom.
Since I've created a var which is a string of the counties I am interested in, can I specify that just those counties become visible? I've tried this code but it does not work
this.cnt.all_cnt[cldcnfips].visible=true
I am worried that the string I am pulling as a reference for those counties (cldcnfips) might not work for calling those instances.
Does anyone have any suggestions or insights?