Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / August 2004



Tip: Looking for answers? Try searching our database.

AS Object to Coldfusion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
feiloiram - 22 Jul 2004 14:36 GMT
Hi,

I'm trying to send a very simple object from flash to coldfusion with remote :
These are my object and my remote-actionscript-lines:

_global.GFSGeneralData_Object.MainTitle = "Title";
_global.GFSGeneralData_Object.SubTitle = "SubTitle";
function HandleIncomGFSData_Result(result) {
    trace("in result :"+result);
}
trace("GFSUploadService makes contact with my COLDFUSION-component with the
method: AddGFStoDB");
GFSUploadService.AddGFStoDB(_global.GFSGeneralData_Object);

I left the initilisation of the remote-gateway to the CFComponent. That part
works(see below)

This is the inportant part of  my COLDFUSION-component :

<cffunction
    name="AddGFStoDB"
    access="remote"
    returntype="string">
    <cfargument name = "TitleObject"
                type="struct"
                required="yes" >
    <cfset myResult = TitleObject>
    <cfreturn myResult>
</cffunction>

If I change the type of the incoming argument to "string" and send a string,
instead of my object, from Flash than everyting works properly. This proves I
have contact with the server, the argument is recieved AND send back.
However changing it back to "struct" and sending the object gives an error :
It says that the required argument isn't passed to the server.

What I'm I doing wrong?
fMidget - 05 Aug 2004 20:50 GMT
This is a little silly, but I have never been able tos end ActionScript objects
to ColdFusion via remoting, but I can send arrays...and I can send arrays that
contain ActionScript objects...

var pointlessArray = [ _global.GFSGeneralData_Object ]
GFSUploadService.AddGFStoDB(pointlessArray );

Then of course you have to recieve it as an array in your cold fusion, but you
can target it's first item as an object and it will be intact.
melo-mel - 20 Aug 2004 20:02 GMT
Ditto, and still no response from Macromedia?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.