I created a component in Flash CS3 that populates a grid with 
points.  I have some filter options that need to hide and show the 
points depending on the what is chosen in the "filter" box.  Most of 
this has been pretty simple and works great but I've run into a 
piece of the code that I just CAN'T work out.  Here's what I have so 
far:

for (var j:int=star_mc.parent.numChildren-1; j >=0; j--) {
        child = getChildAt(j);
        if (child.name.indexOf("point") != -1) {
                if ((child as MovieClip).desktopImpact.indexOf
(deskI) != -1 || (child as MovieClip).helpdeskImpact.indexOf
(helpDI) != -1 || networkArray.indexOf((child as 
MovieClip).networkImpact) == -1) {
        child.visible = false;
        trace("NO MATCH" + "\n");
        } else if ((child as MovieClip).desktopImpact.indexOf(deskI) 
== -1 || (child as MovieClip).helpdeskImpact.indexOf(helpDI) == -1 
|| networkArray.indexOf((child as MovieClip).networkImpact) != -1) {
        child.visible = true;
        trace("MATCH" + "\n");
        }
        };
}

This goes over each filter readio button or combobox and filters out 
on those choices.  The last one I need to do, and where I need the 
help is I have a section in the filter that is 4 checkboxs that 
(something like - one, two, three, etc.)  That variable in the point 
can have any of those values.  So it could be "one" or "two,four" 
or "one,two,three".  I created an array of the checked boxes to loop 
over it but it didn't work for me.

How do I modify this code to work that piece into it?  I'm very lost 
now, so any help would be great.

Thanks,
Mark

Reply via email to