Passing Multi Dimension Array to CFC from Flash

Ask a Question related to Coldfusion Flash Integration, Design and Development.

  1. #1

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


    Here is what I am trying just to test things out:

    <!--- my cfc that dumps the variable to a file just so that I can see if it is
    recieved --->
    <cffunction name="test" access="remote" returntype="string">
    <cfargument name="test" type="struct" required="yes">

    <cfsavecontent variable="dump">
    <cfoutput><cfdump var="#test#"></cfoutput>
    </cfsavecontent>

    <cffile action="write" file="c:\inetpub\test.htm" output="#dump#">

    <cfreturn "true">
    </cffunction>


    My Action Script that triggers a WebServiceConnector when I click a button:
    on(click)
    {
    _parent.testconnector.params = new Object();
    _parent.testconnector.params.test = new Array();
    _parent.testconnector.params.test[0] = new Array();
    _parent.testconnector.params.test[0][0] = "test";
    _parent.testconnector.params.test[0][1] = "test2";
    _parent.testconnector.trigger();
    }

    that does not work, however if I change the code to the following it works
    fine (as a single dimmension array):
    _parent.testconnector.params.test = new Array();
    _parent.testconnector.params.test[0] = "test";
    _parent.testconnector.trigger();


    DaveHCYJ Guest

  2. Similar Questions and Discussions

    1. Converting an XML Array to a multi-level array
      I have an array assigned to a data grid such as: private var myIngredients:Array = new Array( <item ln1="Plain" sn="plain" ln2="(3 cups)...
    2. Initial dimension for a Flash Player screen
      New to Flash 9. Is it possible to configure a Flash Player screen to start up with a defined height and width - I can't see any documentation...
    3. problem with \r\n and \n (when passing multi line string arguement)
      When I call a webmethod from my application, the enter code is encoded as "\r\n" (which is default, Environment.NewLine), when this string...
    4. Multi-dimensional Array
      Hi, Array-Question: Suppose you have an array like: <? $invoices=$taxrate; $invoices=a number; ?>
    5. sorting multi-array
      hello, i have got a problem, tehere is an array: $x = array( array(15,55,array(1,2,3),3,5,array(1,2,5)),...
  3. #2

    Default Re: Passing Multi Dimension Array to CFC from Flash

    I have resorted to making a work around. Since Flash and Coldfusion can work
    with named indexes as well as numbered (in the form of structures in cold
    fusion), I have simply done this:

    I was originaly needing array elements such as:

    myArray[0][0][0] = "text";
    myArray[0][0][1] = "text2";
    etc.

    Instead I use:
    myArray["0.0.0"] = "text";
    myArray["0.0.1"] = "text2";

    and then in cold fusion I have a function that converts that one dimension
    array into a proper 3 dimensional array

    DaveHCYJ 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