Does this behave?
games.game.child("user").(length() == 3).length()
On 26/08/2010 11:00, Alexander Farber wrote:
Hello fellow flashcoders,
I'm still struggling with my e4x problem. With Kenneth's
help I've got it partly working for the cases
where each game has at least 1 user node:
va
Thank you for the pointers, I'll read up on child() and
attribute() - I've missed them in the docs somehow
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
I meant attribute() - attribute() and attributes() are quite different
things ;)
Kenneth Kawamoto
http://www.materiaprima.co.uk/
On 26/08/2010 11:41, Kenneth Kawamoto wrote:
You can use "elements()" (and "attributes()") to avoid getting the
error, i.e.
trace("Full games: " + games.game.(eleme
You can use "elements()" (and "attributes()") to avoid getting the
error, i.e.
trace("Full games: " + games.game.(elements("user").length() ==
3).length());
Kenneth Kawamoto
http://www.materiaprima.co.uk/
On 26/08/2010 11:00, Alexander Farber wrote:
Hello fellow flashcoders,
I'm still stru
Hello fellow flashcoders,
I'm still struggling with my e4x problem. With Kenneth's
help I've got it partly working for the cases
where each game has at least 1 user node:
var games:XML =
;
Hello Kenneth and others,
On Thu, Aug 19, 2010 at 9:05 PM, Kenneth Kawamoto
wrote:
> trace("Full games: " + games.game.(user.length() == 3).length());
> trace("Vacant games: " + games.game.(user.length() < 3).length());
thank you - now my Flash code is working,
but my Flex code is still not work
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
Yeah you should add attributes to your game nodes to seperate them:
var games:XML =
;
then you can use E4X to find the actually amount of users in each game:
**Pseudo Code**
games.game(@id == "1").user.length();
Nathan Mynarci
Hi,
I am not sure you can count the sub-nodes without having some sort
of differentiator between parent nodes.
You might have to loop through the list of games to find how many
users are in each one as your tests for 2 & 3 are returning the total
number of "user" nodes in the tree.
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
10 matches
Mail list logo