Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-26 Thread Alexander Farber
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 = games game user/ user/ user/ /game game user/ user/

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-26 Thread Kenneth Kawamoto
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 struggling

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-26 Thread Kenneth Kawamoto
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: +

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-26 Thread Alexander Farber
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

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-23 Thread Alexander Farber
Hello Kenneth and others, On Thu, Aug 19, 2010 at 9:05 PM, Kenneth Kawamoto kennethkawam...@gmail.com 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

[Flashcoders] E4X question: counting number of subnodes

2010-08-19 Thread Alexander Farber
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

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-19 Thread Glen Pike
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.

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-19 Thread Nathan Mynarcik
Yeah you should add attributes to your game nodes to seperate them: var games:XML = games game id=1 user/ user/ user/ /game game id=2 user/ user/ /game game id=3 user/ user/ /game /games; then you can use E4X to find the actually amount of

Re: [Flashcoders] E4X question: counting number of subnodes

2010-08-19 Thread Kenneth Kawamoto
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

[Flashcoders] asfunction passing a Number as x,x ??

2007-05-25 Thread Allandt Bik-Elliott (Receptacle)
this is a strange one for asfunction i'm constructing my a function call like this productVariations += pa href='asfunction:_parent.itemOverlay,+product+,+i+'I'd like to view this/a/p; to pass 2 dynamic variables - product and i - to the itemOverlay function but if i run function

Re: [Flashcoders] asfunction passing a Number as x,x ??

2007-05-25 Thread Muzak
the values. regards, Muzak - Original Message - From: Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] To: flashcoders flashcoders@chattyfig.figleaf.com Sent: Friday, May 25, 2007 3:01 PM Subject: [Flashcoders] asfunction passing a Number as x,x ?? this is a strange one for asfunction

Re: [Flashcoders] asfunction passing a Number as x,x ??

2007-05-25 Thread Allandt Bik-Elliott (Receptacle)
, as in: 'asfunction:itemOverlay,value1|value2|value3|value4' And use arguments[0].split(|) to get the values. regards, Muzak - Original Message - From: Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] To: flashcoders flashcoders@chattyfig.figleaf.com Sent: Friday, May 25, 2007 3:01 PM Subject: [Flashcoders

[Flashcoders] Re: [Flash_ActionScript] Digest Number 1512

2007-04-04 Thread Ron Wheeler
You should probably try to post this in the flashcoders forum. A lot more help available there. [EMAIL PROTECTED] wrote: There is 1 message in this issue. Topics in this digest: 1a. Re: Set Visibility For Next/Prev Buttons From: Bad Aegis Message

[Flashcoders] flv playback version number

2006-09-14 Thread Ryan Potter
else run into this issue? I downloaded the mpx Restarted flash Deleted the component from library Deleted aso files Restarted flash again Added the component back Same version number ___ Flashcoders@chattyfig.figleaf.com To change

[Flashcoders] assigning properties to Number vs Objects

2006-02-18 Thread keith
/* QUESTION: Why can I assign a property to number value created with Number constructor, but CANNOT assign a property to a number value create with just a number value? I thought Number was kind of an Object too? Maybe this has something to do with primitive and complex data types? --

Re: [Flashcoders] assigning properties to Number vs Objects

2006-02-18 Thread bryan.rice
On Feb 18, 2006, at 1:54 PM, keith wrote: Why can I assign a property to number value created with Number constructor, but CANNOT assign a property to a number value create with just a number value? When you use the new operator it returns an object (an instance of the Number class)

[Flashcoders] Is Not a Number

2005-10-31 Thread Martin Klasson
Run this, once in flash player6-setting, and one time in 7/8, both compiled with as2. The Strong-typing of the parameter doesn't affect the result. But how come this is so indifferent results, was perhaps the output of flsahplayer6 wrong accordingly to ecma? trace(!isNaN(undefined)) / martin

Re: [Flashcoders] Is Not a Number

2005-10-31 Thread Morten Barklund Shockwaved
Martin Klasson wrote: Run this, once in flash player6-setting, and one time in 7/8, both compiled with as2. The Strong-typing of the parameter doesn't affect the result. But how come this is so indifferent results, was perhaps the output of flsahplayer6 wrong accordingly to ecma?