A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Associating string with array?

  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    50

    Associating string with array?

    Hi, I'm just trying to associate a string with a previously declared array but I'm unsure how to do so.

    In this instance, I'm taking the literal string from a combo box label:

    thisString = comboBox.text

    Where thisString is an array I've declared before,and I would like to treat it as the array I made before.


    Thanks guys

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Posts
    171
    Little more detail explanation on how you want the thisString Array?



    arkitx

  3. #3
    Member
    Join Date
    Feb 2007
    Posts
    50
    Sorry. I mean that I would like to manipulate it like as an array that I've previously made i.e:

    someArray = new Array(....)

    comboBoxString = comboBox.text


    Where the text from comboBox.text is now equal to 'someArray' such that I can manipulate 'comboBoxString' and retrieve the same data from 'someArray'.

    comboBoxString[x][y][z] = data


    I hope I haven't been too vague,

    Thanks.

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    If I understood you correctly, then you have to keep updating the array to retrieve the same values
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Member
    Join Date
    Feb 2007
    Posts
    50
    Sorry I guess I'm still not being coherent. I mean when I trace the string comboBoxString for an array value ie:

    trace(comboBoxString[0][0][1])

    I get an undefined value because it's a string, when actually I want to treat the string as the array I defined before.

  6. #6
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    What kind of text does the comboBoxString contain, and how do you want it divided/seperated?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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