Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flash Remoting From CF Using ColdFusion MX and Flash MX to create an efficient and user friendly interface.

Similar presentations


Presentation on theme: "Flash Remoting From CF Using ColdFusion MX and Flash MX to create an efficient and user friendly interface."— Presentation transcript:

1 Flash Remoting From CF Using ColdFusion MX and Flash MX to create an efficient and user friendly interface.

2 Rich User Interface Demonstrating the development of a small Flash MX application that uses CFMX back-end to pull information from a Database

3 What we will be using. ColdFusion Compontents Flash Remoting ActionScript

4 Software Review and Setup ColdFusion MX Server Flash MX Flash Remoting Components Test Flash Remoting Gateway

5 Example Application 1. Set up Data Base 2. Program ColdFusion Component 3. Test Flash Remoting Gateway 4. Add Flash Components and Functions

6 CF Component Select distinct division from members Order by division

7 Initialize Flash Gateway #include "NetServices.as" #include "DataGlue.as" #include "NetDebug.as" ftnInit = function () { if (this.inited != undefined) { return; } else { this.inited = true; NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway/"); gatewayConnnection = NetServices.createGatewayConnection(); fooMember = gatewayConnnection.getService("member.memberlist", this); dataForServer = new Object(); trace("Gateway Initialized"); } }; ftnInit();

8 Add Flash Component (pullDownMenu) Add Flash Component (combo box) Name it “pullDownMenu” Add function ftnGetDivision = function(){ fooMember.GetDivision(); trace("GetDivision Ran"); this.onResult = function(dataFromServer){ var itemToAdd = {division: "Select Division"}; dataFromServer.addItemAt(0, itemToAdd); DataGlue.BindFormatStrings(pullDownMenu, dataFromServer, "#division#", "#division#"); }; Result set is added to pullDownMenu

9 Add ListBox ftnGetGroup = function(){ var fooValue = pullDownMenu.getValue(); fooMember.GetGroup(fooValue); trace("Got a Member" + fooValue); this.onResult = function(dataFromServer){ trace("yes"); trace(dataFromServer.getLength()); DataGlue.BindFormatStrings(menuGroup, dataFromServer, "#LastName#, #FirstName#", "#id#");}; };

10 Add Text Boxes Add Label Text Add Dynamic Text Box Assign Variable Name Assign as Input Text Align and Format

11 Function to populate TextBox ftnGetIndividual = function(){ trace(menuGroup.getSelectedIndex()); trace(_global.myRecord.getColumnNames()); var fooIndex = menuGroup.getSelectedIndex(); _root.txtFirstName = _global.myRecord.items[fooIndex].FirstName; _root.txtLastName = _global.myRecord.items[fooIndex].LastName; _root.txtDivision = _global.myRecord.items[fooIndex].Division; _root.txtEmail = _global.myRecord.items[fooIndex].Email; } ftnClearAll = function(){ _root.txtFirstName = ""; _root.txtLastName = ""; _root.txtDivision = ""; _root.txtEmail = ""; }

12 Application Examples Questions


Download ppt "Flash Remoting From CF Using ColdFusion MX and Flash MX to create an efficient and user friendly interface."

Similar presentations


Ads by Google