PDA

View Full Version : flash remoting returning results to flash


baigorri
02-19-2003, 09:00 PM
Is it possible to return more than one result from a cfm page into flash?

here's a sample of whats on the cfm page


<cfif loginQuery.recordcount lt 1>
<cfset flash.result = error>
<cfelse>
<cfset flash.result = cf_uname>
<cfset flash.anotherVar = "something">
</cfif>


here's the function that handles the results in flash


function flashlogin_Result(message) {
trace(message);
trace(anotherVar);
}


anotherVar is undefined when traced.

How do I bring in "anotherVar" into flash as well?

this is probably really simple, and I will slap myself when I get the answer so don't hesitate to answer

Chris

soc
02-21-2003, 03:00 AM
to tell you the truth, i'm new to Flash remoting and haven't even really looked at coldfusion at all but i think the answer is to return an object that has both values.

I don't know what the code for that in coldfusion would be but i'd imagine that this is the corresponding result code:

function flashlogin_Result(message) {
trace(message.var1);
trace(message.var2);
}