RE: [Flashcoders] How to iterate through arrays

2010-11-14 Thread Cor
I switch to XML, and now I am back to my problem. I would like to dynamically create buttons for every menu and submenu tag, AND keep track of their depth somehow (indexed multidimensional array). Can anyone show me some way how to do this? //-XML -

RE: [Flashcoders] How to iterate through arrays

2010-11-13 Thread Cor
...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: zaterdag 13 november 2010 17:58 To: Flash Coders List Subject: Re: [Flashcoders] How to iterate through arrays On 13/11/2010 16:44, Cor wrote: > OK, I think I figured it out. > > function

Re: [Flashcoders] How to iterate through arrays

2010-11-13 Thread Paul Andrews
On 13/11/2010 16:44, Cor wrote: OK, I think I figured it out. function findIndex (psdArray:Array, psdButton:Object, psdLevel:uint):void { for (var i:uint=0; i< psdArray[psdLevel].length; ++i){ var curBtn:uint = psdArray.indexOf(psdButton); if(curBtn == -

Re: [Flashcoders] How to iterate through arrays

2010-11-13 Thread Paul Andrews
riginal Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: zaterdag 13 november 2010 17:14 To: Flash Coders List Subject: Re: [Flashcoders] How to iterate through arrays On 13/11/2010 15:17, Cor wrote: I am trying to create

RE: [Flashcoders] How to iterate through arrays

2010-11-13 Thread Cor
OK, I think I figured it out. function findIndex (psdArray:Array, psdButton:Object, psdLevel:uint):void { for (var i:uint=0; i< psdArray[psdLevel].length; ++i){ var curBtn:uint = psdArray.indexOf(psdButton); if(curBtn == -1){ ++psdLevel;

RE: [Flashcoders] How to iterate through arrays

2010-11-13 Thread Cor
oders List Subject: Re: [Flashcoders] How to iterate through arrays On 13/11/2010 15:17, Cor wrote: > I am trying to create a menu with 5 levels deep submenus. Sounds like a UI nightmare for the user. > My best guess is to do this with an array with a bunch of arrays in it, > which also

Re: [Flashcoders] How to iterate through arrays

2010-11-13 Thread Paul Andrews
On 13/11/2010 15:17, Cor wrote: I am trying to create a menu with 5 levels deep submenus. Sounds like a UI nightmare for the user. My best guess is to do this with an array with a bunch of arrays in it, which also contain arrays, etc. And now I have to iterate through all the levels of the arra

[Flashcoders] How to iterate through arrays

2010-11-13 Thread Cor
I am trying to create a menu with 5 levels deep submenus. My best guess is to do this with an array with a bunch of arrays in it, which also contain arrays, etc. And now I have to iterate through all the levels of the arrays. So I need some example how to iterate regards the amount of arrays and i