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();
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
Don't see what you're looking for? Try a search.
|