Array from ASP to Flash?

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

  1. #1

    Default Array from ASP to Flash?

    I'm trying to get the value of variables from an ASP page where the variable
    name is created dynamically in the ASP page based on the number of records
    returned from the database search:

    55 records returned =
    compName1 = "xxxxx"
    compName2 = "xxxxx"
    .. . . . . .
    compName55 = "xxxxx"

    ASP returns all of these variables in the string back to Flash. But I can't
    figure out how to get these variables out of the string for use in Flash.

    I've tried:

    for (var i = 0; i<dataReceiver.intCounter; i++) {
    x = i+1;
    trace("dataReceiver.compName" + x);
    }

    This only returns . . .

    compName1, compName2 . . . . compName55

    How do I get the values of those variable names?



    Andy Petroski Guest

  2. Similar Questions and Discussions

    1. Send an array from Flash 8 to PHP
      Hi guys. I am using flash 8 and actionscript 2 I have created an array in flash to send to php using getURL and POST. i.e. on (release) { var...
    2. Passing Multi Dimension Array to CFC from Flash
      Passing a single dimension array works just fine, but is there a way to pass a multi dimension array? Your thoughts/help would be greatly...
    3. loop over flash array in cfc..
      hi. i'm passing a simple array from flash to a cfc and trying to understand how to loop over it using an index loop to make my sql inserts. i...
    4. XML to flash array
      So I'm getting data from an XML file which is automatically generated by an asp.net page. I need to load the info into an array of simple objects...
    5. Dynamique array in flash ?
      hello,i am student in Avignon,France and i I know how to make a dynamique array in php but i don't know if it is possible in flash and i don't know...
  3. #2

    Default Re: Array from ASP to Flash?

    You might wanna try:

    trace(eval("dataReceiver.compName" + x));

    By the way: what is that x = i+1; doing there?

    John
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  4. #3

    Default Re: Array from ASP to Flash?

    Thank you, thank you, thank you . . . I thought that might be it but
    couldn't quite put it together.

    "Laiverd.COM" <share_your_knowledge@someserver.com> wrote in message
    news:c1to11$70o$1@forums.macromedia.com...
    > You might wanna try:
    >
    > trace(eval("dataReceiver.compName" + x));
    >
    > By the way: what is that x = i+1; doing there?
    >
    > John
    > --------------------------------------------------------------------------
    --
    > -----------
    > RESOURCES
    > [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    > --------------------------------------------------------------------------
    --
    > -----------
    > TUTORIALS at
    > [url]www.laiverd.com[/url]
    > Flash & PHP Emailform
    > Using textfiles in Flash
    > --------------------------------------------------------------------------
    --
    > -----------
    >
    >

    Andy Petroski Guest

  5. #4

    Default Re: Array from ASP to Flash?

    try:
    for (prop in myArray){ // or any object for that matter.
    trace("variable :"+prop+" value: "+[prop])
    }

    // remember this iterates backwards.

    hope this helps
    John Ryan
    Melbourne Australia


    "Andy Petroski" <petroski@earthlink.net> wrote in message
    news:c1tn5m$62u$1@forums.macromedia.com...
    > I'm trying to get the value of variables from an ASP page where the
    variable
    > name is created dynamically in the ASP page based on the number of records
    > returned from the database search:
    >
    > 55 records returned =
    > compName1 = "xxxxx"
    > compName2 = "xxxxx"
    > . . . . . .
    > compName55 = "xxxxx"
    >
    > ASP returns all of these variables in the string back to Flash. But I
    can't
    > figure out how to get these variables out of the string for use in Flash.
    >
    > I've tried:
    >
    > for (var i = 0; i<dataReceiver.intCounter; i++) {
    > x = i+1;
    > trace("dataReceiver.compName" + x);
    > }
    >
    > This only returns . . .
    >
    > compName1, compName2 . . . . compName55
    >
    > How do I get the values of those variable names?
    >
    >
    >

    jr 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