MACROMEDIA FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 Use Manual page 58

Using flash remoting for flash mx 2004 actionscript 2.0
Table of Contents

Advertisement

The ActionScript code for this example imports the RemotingConnector class and the
appropriate classes for the user interface components, and creates the CustomerInfoFormCon
class, which extends the Form class. The sections following the ActionScript code describe the
functions in this class.
import mx.data.components.RemotingConnector;
import mx.controls.DataGrid;
import mx.controls.gridclasses.DataGridColumn;
import mx.controls.ComboBox;
import mx.controls.TextArea;
import mx.screens.Form;
import mx.controls.TextInput;
import mx.controls.Label;
import mx.controls.Loader;
import mx.controls.Alert;
class CustomerInfoFormCon extends Form
{
function CustomerInfoFormCon() {
super();
initialized = false;
addEventListener( "reveal", onReveal );
}
// initializes the display
function onReveal():Void {
// initialize stuff
if( !initialized ) {
var col:DataGridColumn = new DataGridColumn( "ID" );
customers_grd.addColumn( col );
col = new DataGridColumn( "Active" );
col.width = 80;
customers_grd.addColumn( col );
col = new DataGridColumn( "Name" );
col.width = 250;
customers_grd.addColumn( col );
col = new DataGridColumn( "TotalSales" );
col.width = 80;
col.textAlign = "right";
customers_grd.addColumn( col );
// register a listener for change in selection in DataGrid
customers_grd.addEventListener( "change", onCustGrid_Change );
// setup remaining
mx.remoting.debug.NetDebug.initialize(); // initialize the NCD
totalRec_txt.setStyle( "textAlign", "right" );
totalSales_label.setStyle( "textAlign", "right" );
// Now we are ready to trigger categoryData_con to fetch all the
// categories in ComboBox - invoking trigger()
categoryData_con.addEventListener( "status", onCategoryDataFault );
categoryData_con.addEventListener( "result", onCategoryData );
customerData_con.addEventListener( "result", onCustomerData );
customerData_con.addEventListener( "status", onCustomerDataFault );
58
Chapter 3: Using the RemotingConnector component (Flash Professional only)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash remoting mx

Table of Contents