# Filtering problem

**URL:** <https://forum.kirupa.com/t/filtering-problem/293318>\
**Category:** flash\
**Created:** [July 27, 2009, 12:29pm UTC](https://forum.kirupa.com/t/filtering-problem/293318 "2009-07-27T12:29:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazyhorsefc](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@crazyhorsefc](https://forum.kirupa.com/u/crazyhorsefc)\
**Post date:** [July 27, 2009, 12:29pm UTC](https://forum.kirupa.com/t/filtering-problem/293318/1 "2009-07-27T12:29:12Z")

</div>

You may have seen a post I made last week concering a football match accumulator. I manage to solve the problem of bringing in the correct matches but I know have another bug.

Although my AS successfully filters the games the way I want, I am left with a big gap between the first game and the next game - largely due to the fact that that although it is filtering the matches it is leaving a space where the omitted games should be.

Is there a way of fixing this problem?

# XML is here:

\<event name=“Chelsea v Hull City” date=“1st January” time=“01:00” event\_name=“Premiership” big\_4=“1”\>  
\<participant name=“Chelsea” best=“2/9” best\_dig=“1.22” hda=“H” /\>  
\<participant name=“Draw” best=“23/4” best\_dig=“6.8” hda=“D” /\>  
\<participant name=“Hull City” best=“18/1” best\_dig=“19” hda=“A” /\>  
\</event\>  
\<event name=“Portsmouth v Fulham” January" time=“01:00” event\_name=“Premiership” big\_4=“0”\>  
\<participant name=“Portsmouth” best=“11/8” best\_dig=“2.38” hda=“H” /\>  
\<participant name=“Fulham” best=“11/5” best\_dig=“3.2” hda=“A” /\>  
\<participant name=“Draw” best=“9/4” best\_dig=“3.25” hda=“D” /\>  
\</event\>  
\<event name=“Tottenham v Liverpool” date=“1st January” time=“01:00” event\_name=“Premiership” big\_4=“1”\>  
\<participant name=“Liverpool” best=“5/4” best\_dig=“2.25” hda=“A” /\>  
\<participant name=“Draw” best=“9/4” best\_dig=“3.25” hda=“D” /\>  
\<participant name=“Tottenham” best=“13/5” best\_dig=“3.6” hda=“H” /\>  
\</event\>

=========================================

relevant bit of script here:

for (i=0; i\<numberItems; i++) {  
if (matchesNode.childNodes\*.attributes[“big\_4”] == 1) {  
mainNames = matchesNode.childNodes\*.attributes.name;  
mainNames = mainNames.split(" v ");  
homeTeam = mainNames[0];  
drawTeam = “Draw”;  
awayTeam = mainNames[1];  
entry = attachMovie(“workEntry”, “entry\_”+i, layercounter);  
entry.\_x = 0;  
entry.\_y = i\*30;  
entry.home\_txt.text = homeTeam;  
entry.draw\_txt.text = drawTeam;  
entry.away\_txt.text = awayTeam;  
}  
layercounter++;  
}

Pretty certain its to do with the entry.\_y bit.

Cheers in advance.
