May be this is what you after?
trace("Full games: " + games.game.(user.length() == 3).length());
trace("Vacant games: " + games.game.(user.length() < 3).length());
// Trace
Full games: 1
Vacant games: 2
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Alexander Farber wrote:
Hello,
my server delivers XML data over socket,
representing games, with up to 3 players in each.
In my custom component I'd like to display
a summary: total number of games,
number of full games (3 players)
number of vacant games (joinable, because less than 3 players).
I've prepared a reduced test case demonstrating my problem:
var games:XML =
<games>
<game>
<user/>
<user/>
<user/>
</game>
<game>
<user/>
<user/>
</game>
<game>
<user/>
<user/>
</game>
</games>;
trace("All games: " + games.game.length());
trace("Full games: " + games.game.user.(length() == 3).length());
trace("Vacant games: " + games.game.user.(length() < 3).length());
It prints wrong results for the 2 last calculations:
All games: 3
Full games: 0
Vacant games: 7
And a warning:
Warning: 1060: Migration issue: The method length is no longer
supported. Use the length property of the argument instead..
Please advise me
Alex
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders