Professional Web Applications Themes

for( ).....complicated.. - Macromedia Flash Actionscript

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 ...

  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. #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

Similar Threads

  1. Complicated Insert
    By xSeanx in forum Coldfusion Database Access
    Replies: 3
    Last Post: May 10th, 01:06 AM
  2. pattern need help... so complicated
    By kylekwan@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 10
    Last Post: April 21st, 09:22 AM
  3. A bit more complicated....
    By Dave Simon webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: January 10th, 05:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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