dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Searching Arrays..

  1. #1
    Senior Member
    Join Date
    Oct 2001
    Posts
    105
    Is there a quick way to search an array, specifically for use in combo boxes in mx...


    Cris.

  2. #2
    Flash Honkie
    Join Date
    Nov 2001
    Location
    Athens, Ga
    Posts
    212

    Array searching

    that's something I have to deal with as well. As far as I've been able to find, the easiest way is to just have a looping variable and put that in yourarray[i] and have your frame rate pretty high. I'll let you know though if I find anything.

    - jeremy

  3. #3
    Senior Member
    Join Date
    Oct 2001
    Posts
    105

    Re: Array searching

    I realise you can do this with a 'loop while' statement and having a count until it equals array length, this just seems a bit messy though.

    I was hoping MX might have come up with a neat command to sort this. Perhaps I should set up a function with (arrayname, searchstring ) and use this for all my array searches.

    Cris.

  4. #4
    Flash Honkie
    Join Date
    Nov 2001
    Location
    Athens, Ga
    Posts
    212

    array follow-up

    Yeah, that's actually what I did.

    I use an array to keep track of buildings in my downtown area and dynamically create buttons. There are 208 entries in each of my 4 arrays.

    Here's what I am talking about:

    http://www.islandathens.com/index2.html

    click on Categories at the top and choose a group.

    It searched through them pretty quickly, but I think my framerate is 60/second. But that'll change depending on your graphics card.

    Lemme know how it goes.

    - Jeremy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center