for( ).....complicated..

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default for( ).....complicated..

    ok, here's the deal...

    I have 50 dynamic text on the stage. fds0, fds1, fds2, fds3, etc...

    Each of them read a cookie previously written on the computer, and
    they show a day of the week. Ex.: Thursday

    So, if I write :
    for (i=0; i<50; i++) {
    trace(fds0)
    }
    it returns : ThursdayThursdayThursday, wich is good. But I want to do it
    dynamically,
    with every text field that I have...

    So I wrote :
    for (i=0; i<50; i++) {
    trace(fds+i)
    }
    it returns : 0 1 2 3 4 5, wich is not good.


    So I tried :
    for (i=0; i<50; i++) {
    trace("fds"+i)
    }
    it returns : fds0, fds1, fds2, fds3, wich is totally not good.

    I need the value of the text field, not its name...

    Any ideas ?

    UsualSuspect Guest

  2. Similar Questions and Discussions

    1. Complicated variable
      I have a database query, which i output and also use 2 loops in. optionx and qtyx are loop index's. i want to use those loop index's to output a...
    2. Complicated Insert
      I have several rows of data in a table which i want to insert into only 1 row in another table. Is it possible to do an insert query from a select...
    3. pattern need help... so complicated
      hi, need some help over how to create this pattern... <http://img47.photobucket.com/albums/v144/kylekwan/pattern.jpg> I'm using AI 10. Have...
    4. A bit more complicated....
      can any one help me with this ? if i press the button refresh in my browser my movie stop playing i tried to insert a rewind in my script but it...
  3. #2

    Default Re: for( ).....complicated..

    Nearly there - try:
    for (i=0; i<50; i++) {
    trace(this["fds"+i])
    }


    --
    ---------------------------------------
    http://www.phageinteractive.com
    PhageInteractive Ltd.
    remove mm_ to mail
    ---------------------------------------
    'I wish we lived in a world where it was possible to be religious and think
    at the same time.' - Jonh Graves



    Peter Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139