essage-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Polk
Sent: Sunday, August 14, 2011 9:40 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Simplify XML Call
> From: Taka Kojima
> To: Flash Coders List
> Sent: Su
> From: Taka Kojima
> To: Flash Coders List
> Sent: Sunday, August 14, 2011 4:24 AM
> Subject: Re: [Flashcoders] Simplify XML Call
> function getNumItems(level:int, xml:XML):int{
> var levelXML:XML = xml.menu;
> for(var i:int = 0; i < level; i ++){
> levelXML = lev
rt Denniston
>> Barney Elmington
>> Campo Fatigua
>> Harpo Oprah
>> Hugo Boss
>> Benny Elkins
>> Sheri Downing
>> Marcia Marquez
>> Manny Peterson
>> Joe Merritt
>>
>> Jason Merrill
>> Instructional Technology Architect II
>
gt; Harpo Oprah
> Hugo Boss
> Benny Elkins
> Sheri Downing
> Marcia Marquez
> Manny Peterson
> Joe Merritt
>
> Jason Merrill
> Instructional Technology Architect II
> Bank of America Global Learning
>
>
>
>
>
> ___
>
>
> -Or
lashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason
Sent: Saturday, August 13, 2011 9:58 PM
To: Flash Coders List
Subject: RE: [Flashcoders] Simplify XML Call
>> Then I think I hit on what Jason was suggesting:
Not really. :
ubject: Re: [Flashcoders] Simplify XML Call
> From: Henrik Andersson
> To: Flash Coders List
> Sent: Saturday, August 13, 2011 3:37 PM
> Subject: Re: [Flashcoders] Simplify XML Call
>
> There is still no eval function.
I know there is no eval fn. Jason Merrill earlier wrote: "Yo
> From: Henrik Andersson
> To: Flash Coders List
> Sent: Saturday, August 13, 2011 3:37 PM
> Subject: Re: [Flashcoders] Simplify XML Call
>
> There is still no eval function.
I know there is no eval fn. Jason Merrill earlier wrote: "You just need a
recursive loop to do
There is still no eval function.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
] Simplify XML Call
ActionScript 3 is a compiled language. There is no such thing as an
eval function in as 3.
Well, that's the crux of my problem, Henrik. How do I get around
writing code that adds just the right number of "item units" without
doing it as a string to evalua
> From: Henrik Andersson
> To: Flash Coders List
> Sent: Friday, August 12, 2011 1:43 PM
> Subject: Re: [Flashcoders] Simplify XML Call
>
> ActionScript 3 is a compiled language. There is no such thing as an eval
> function in as 3.
Well, that's the crux of my pro
ActionScript 3 is a compiled language. There is no such thing as an eval
function in as 3.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
I appreciate Ktu's efforts here; however, Merrill is right. I've written this:
var j:String = "xml.menu.item[whichItems[0]]";
var k:String = new String();
var l:int = level;
while (l--)
{
k += ".item[whichItems
>>(I try not to do more than people ask for. It's easy to get sucked into
>>solving a larger problem than was asked)
Yes, I agree totally, that can be a problem for sure.
>> - apparently he already knows how deep to go. his original post said "switch
>> (level) {"
Yeah, understood. I was just
merica Global Learning
>
>
>
>
>
> ___
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu
> Sent: Thursday, August 11, 2011 2:14 PM
> To: Flash Coders
half Of Ktu
Sent: Thursday, August 11, 2011 2:14 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Simplify XML Call
"that would be limited to you hard coding the number of levels to go down to"
- he already had this level var created with whatever number he had intended,
I was just givi
"that would be limited to you hard coding the number of levels to go down
to"
- he already had this level var created with whatever number he had
intended, I was just giving an example value...
" If the XML gets larger and deeper, that function would fail... "
- why would it fail? (assuming that
While you have the right spirit I think that it would be a better idea
to check the length of the array instead. That way you won't
accidentally step out of bounds there.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.f
: Re: [Flashcoders] Simplify XML Call
sorry should have been this:
var level:int = 5;
var xmlItem:* = xml.menu;
for (var i:int = 1; i < level; i++) {
xmlItem = xmlItem.item[this["whichItem" + ((i == 1) ? "" : i)]];
}
totalItems = xmlItem.item.l
does not have any children. No switch
>> statement would be needed. Make sense?
>>
>>
>> Jason Merrill
>> Instructional Technology Architect II
>> Bank of America Global Learning
>>
>>
>>
>>
>>
>> _______
>
rrill
> Instructional Technology Architect II
> Bank of America Global Learning
>
>
>
>
>
> ___
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Polk
> Sent:
Subject: [Flashcoders] Simplify XML Call
Hi;
I have this code:
switch (level)
{
case 2:
totalItems = xml.menu.item[whichItem].item.length();
break;
case 3:
totalItems =
xml.menu.item
Hi;
I have this code:
switch (level)
{
case 2:
totalItems = xml.menu.item[whichItem].item.length();
break;
case 3:
totalItems =
xml.menu.item[whichItem].item[whichItem2].item.length
22 matches
Mail list logo