Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #21

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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 ? ...
    5. 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...
  3. #22

    Default 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

  4. #23

    Default 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

  5. #24

    Default Re: Flash Remoting

    can you provide some of your code
    reya276 Guest

  6. #25

    Default 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

  7. #26

    Default 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

  8. #27

    Default 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

  9. #28

    Default 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

  10. #29

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139