Groups | Blog | Home
all groups > macromedia flash flash remoting > june 2005 >

macromedia flash flash remoting : Returning value from myFunction_result


mshaheen220
6/7/2005 8:45:50 PM
I have a simple remoting call that returns a user name based on a supplied ID.
It works fine if within myFunction_result I set the value of a text field to
the return value of the function. But, I don't want to set a specific textfield
with the value. Instead, I'd like to return the value of the function to a
different variable each time that function is called. Any ideas?

i.e.:

function getStudentName_Result(data) {
//this line does not work
return data;

//this line will work
sometextfield_txt.text = data;
}


tutsamewasa
6/9/2005 7:00:58 AM
Hi Shaheen,

The "xyz_Result" and "xyz_Status" functions are a kind of CallBack function
that are called from your Remoting application in response to a remoting
request. So there is no return in that. And if you even try to return you are
trying to return to your Remoting application and not to flash that is not
possible.

What you can do is you can call another function/s from the xyz_Result based
on the conditions if you have to set any variable or to perform any other task
that you want to perform after the Remoting call.


Hope this helps

Good Luck

Hemendra Singh Shaktawat

Mindfire Solutions
www.mindfiresolutions.com
tutsamewasa
6/9/2005 7:03:57 AM
Hi Shaheen,

The "xyz_Result" and "xyz_Status" functions are a kind of CallBack function
that are called from your Remoting application in response to a remoting
request. So there is no return in that. And if you even try to return you are
trying to return to your Remoting application and not to flash that is not
possible.

What you can do is you can call another function/s from the xyz_Result based
on the conditions if you have to set any variable or to perform any other task
that you want to perform after the Remoting call.


Hope this helps

Good Luck

Hemendra Singh Shaktawat

Mindfire Solutions
www.mindfiresolutions.com
AddThis Social Bookmark Button