Ask a Question related to Macromedia ColdFusion, Design and Development.
-
Rick #21
Re: Flash Remoting
This worked sooooooo great!!!!!!
Thanks!!!
"doug777" <doug777@ms15.hinet.net> wrote in message
news:e0sc28$7nk$1@forums.macromedia.com...> You're right, you can only return one thing from a function, but that
> thing can be a query, a structure (and for both these the AS return type
> should be Object), a string, a number and what you've got this time, a
> list. Since this is a list, your variable type should be results:String,
> not :Number.
>
> Unfortunately AS does not have any list handling capabilities, so you need
> to turn this into an array. In flash forms we can't use the 'new' keyword
> so do it like this:
>
> var retarray:Array = results.split(",");
>
> Now retarray[0] will equal 57.34 and retarray[1] will equal 99.00, so
>
> stax.text = retarray[0];
>
> Always glad to be of help, but I'm off the forum for a while so if you
> want more help I suggest you start a new thread.
>
> Doug
Rick Guest
-
Flash Remoting from Flash (not Flex) via AMF3
Hello, I'm trying to fashion a flash application with AS3 under Flash against Coldfusion 8 via the AMF3 / flex2gateway. I receive this error on... -
Consuming Flash arrays with flash remoting
Hello, Does anyone know of some resources where you can get examples of consuming a flash array with a coldfusion component using flash... -
Flash Media Server vs Flash Remoting
I was wondering what are the pros and cons of moving our text based broadcast service from Flash Remoting to Flash Media server. Right now we have... -
Does Flash Communication server include Flash remoting ?
We plan to use Flash communication server and flash remoting. Now the most simple question, does the com-server already include flash remoting ? ... -
CF 7 and Flash Remoting
I hope this is a pretty simple question. I have Flash Remoting set up under my old cf 6.1 environmnent (but I don't recall what we did to set it... -
SSandlin #22
Flash Remoting
Just started new site on Lynux server. Have several sites on MS Servers and
using falsh remoting successfully on all of them.
Just need to know if there is anything different about the coding for the
"myservices" gateway connection that my be different from the MS servers flash
remoting code.
For example on MS Servers the final connection is :
myService = gateway_conn.getService("rl." + xs, this);
Do I need to use this for Lynux:
myService = gateway_conn.getService("vservers.rl." + xs, this);
Or is that already referrenced by the IP?
Just seeing if anyone out there has a clue!
SSandlin Guest
-
lgschulz #23
Flash Remoting
I am trying to use Flash remoting and it's doesn't seem to be working. All I get is a blank page. No error message or anything. Can anyone help?
lgschulz Guest
-
-
lgschulz #25
Re: Flash Remoting
I am not sure home much code you need. So here is part of it and if you need
more let me know.
main page:
<body>
<table id="container"><tr><td>
<cfform name="MaterialDB" format="flash" width="990" height="600"
preservedata="yes" onLoad="initApp()" style="themeColor:##56A1E1;
marginRight:-12; background-color:##37749D;">
<!-- This is telling the columns to wordwrap of the text is larger than field
size. -->
<cfformitem type="script">
public function initApp():Void
{
MaterialDB.myGlobalObjects = {};
MaterialDB.myGlobalObjects.isEditMode = false;
<!--- set up remoting service --->
setUpRemoting();
<!--- set up styles --->
setStyles();
var gridMaterial=gridMaterial;
gridMaterial.variableRowHeight = true;
gridMaterial.getColumnAt(2).wordWrap = true;
gridMaterial.getColumnAt(3).wordWrap = true;
gridMaterial.getColumnAt(5).wordWrap = true;
gridMaterial.getColumnAt(6).wordWrap = true;
}
public function setUpRemoting():Void{
<cfoutput><!--- cfoutput to be able to set the gateway dynamically. It is
recommended however to write the actual gateway instead --->
<!--- var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("h ttp://#cgi.HTTP_HOST#/flashser
vices/gateway/");
this should evaluate to --->
var componentPath = MHC.components.ListingGateway";
<!--- componentPath variable is controlled in Application.cfc for more
flexibilty on where the sample application has been saved
--->
var componentPath:String = "#request.componentPath#.services.ListingServi ce";
</cfoutput>
var responseHandler:Object = {};
<!--- put controls in the responseHandler's scope --->
var gridMaterial:mx.controls.DataGrid = gridMaterial;
<!--- handle search by default onResult function --->
responseHandler.onResult = function( results: Object ):Void {
gridMaterial.dataProvider = results;
_root.setMode('add');
mx.managers.CursorManager.removeBusyCursor();
}
<!--- this function is called when search button is clicked --->
public function submitSearch():Void
{
<!--- get all the search criteria items --->
var searchArguments:Object = {};
<!--- show clock cursor --->
mx.managers.CursorManager.setBusyCursor();
<!--- call service --->
MaterialDB.myGlobalObjects.listingService.search(s earchArguments);
}
</cfformitem>
lgschulz Guest
-
lgschulz #26
Re: Flash Remoting
I sent the wrong code. Here is the updated code.
<cfscript>
//make an empty query to prepopulate grid, only needed due to data mask
SearchMaterials = queryNew("PART_NUMBER, DESCRIPTION, MATERIAL_DESCRIPTION,
SELECTION_CODE, MIUL_REMARKS, MP_COMMENTS","varchar, varchar, varchar, varchar,
varchar, varchar");
</cfscript>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Material Hardware Connector Database</title>
<style >
html, body{
height:100%;
margin:0;
}
body{
background: #202020 url(assets/images/patternBg.gif);
}
#container{
margin: auto;
background: #195075 url(assets/images/background.gif) center center repeat-x;
width: 950px;
border: 1px solid #222;
height: 100%;
}
</style>
</head>
<body>
<table id="container"><tr><td>
<cfform name="MaterialDB" format="flash" width="990" height="600"
preservedata="yes" onLoad="initApp()" style="themeColor:##56A1E1;
marginRight:-12; background-color:##37749D;">
<cfformitem type="script">
public function initApp():Void
{
MaterialDB.myGlobalObjects = {};
MaterialDB.myGlobalObjects.isEditMode = false;
<!--- set up remoting service --->
setUpRemoting();
<!--- This is telling the columns to wordwrap of the text is larger than field
size. --->
var gridMaterial=gridMaterial;
gridMaterial.variableRowHeight = true;
gridMaterial.getColumnAt(2).wordWrap = true;
gridMaterial.getColumnAt(3).wordWrap = true;
gridMaterial.getColumnAt(5).wordWrap = true;
gridMaterial.getColumnAt(6).wordWrap = true;
}
public function setUpRemoting():Void{
<cfoutput>
<!--- cfoutput to be able to set the gateway dynamically. It is recommended
however to write the actual gateway instead --->
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("h ttp://localhost:8500/flashserv
ices/gateway/");
</cfoutput>
var responseHandler:Object = {};
<!--- put controls in the responseHandler's scope --->
var gridMaterial:mx.controls.DataGrid = gridMaterial;
<!--- handle search by default onResult function --->
responseHandler.onResult = function( results: Object ):Void {
gridMaterial.dataProvider = results;
_root.setMode('add');
mx.managers.CursorManager.removeBusyCursor();
}
<!--- this function is called when search button is clicked --->
public function submitSearch():Void
{
<!--- get all the search criteria items --->
var searchArguments:Object = {};
<!--- show clock cursor --->
mx.managers.CursorManager.setBusyCursor();
<!--- call service --->
MaterialDB.myGlobalObjects.listingService.search(s earchArguments);
}
</cfformitem>
lgschulz Guest
-
SJ11 #27
Flash remoting
I'm running CF MX7, do I need anything else to provide data to flash components? Any good resources you can recommend on learning this?
SJ11 Guest
-
LL@Work #28
Re: Flash remoting
See "Data Integration Articles" at [url]http://www.adobe.com/devnet/flash/data_integration.html[/url]
There are a couple of intermediate and advanced ColdFusion/Flash Integration tutorials there
LL@Work Guest
-
SJ11 #29
Re: Flash remoting
I guess I asked the wrong question...
There's flash remoting server, flex server, and Cold Fusion. Cold fusion says
that it does flash and flex. Does the flash remoting server and Flex server
give anything above what I can do with my CF server?
SJ11 Guest



Reply With Quote

