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

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

Advertisement

col = new DataGridColumn( "TotalSales" );
col.width = 80;
col.textAlign = "right";
customers_grd.addColumn( col );
customers_grd.addEventListener( "change", onCustGrid_Change );
// setup remaining
totalRec_txt.setStyle( "textAlign", "right" ); //set the textField to
Left Align
totalSales_label.setStyle( "textAlign", "right" );
initialized = true;
}
}
// updateDetails will update the details TextArea, textInput and the
// Loader present on the screen changes will be updated when the selection
// in DataGrid changes
function updateDetails():Void {
var curItem:Object = customers_grd.selectedItem;
custInfo_txt.text = curItem.Details;
totalSales_label.text = curItem.TotalSales;
custLogo_ldr.load( curItem.Logo );
}
// gets the customer data for the current category selected
function refreshCustomerData():Void {
var pc:PendingCall = custService.getCustomers( custCat_cmbo.selectedItem.
data );
pc.responder = new RelayResponder( this, "onCustomerData",
"onCustomerDataFault" );
}
// updates the detail section when a new item is selected in the grid
function onCustGrid_Change( eventObj: Object ):Void {
mx.remoting.debug.NetDebug.trace({ level:"Debug",
message:"onCustGrid_Change" });
eventObj.target._parent.updateDetails();
}
// updates the grid with the new customers based on the category selected
function onCustCat_Change( eventObj: Object ):Void {
eventObj.target._parent.refreshCustomerData();
}
// handles the results from the getCategories() call
function onCategoryData( re:ResultEvent ):Void {
mx.remoting.debug.NetDebug.trace({level:"Debug", message:"onCategoryData"
});
// use data glue to remap the fields so that label = name field and data =
id field
DataGlue.bindFormatStrings( custCat_cmbo, re.result, "#Name#", "#ID#" );
custCat_cmbo.addEventListener( "change", onCustCat_Change );
refreshCustomerData();
}
Using the Flash Remoting ActionScript API in the CustomerInfoExampleAPI application
49

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

This manual is also suitable for:

Flash remoting mx

Table of Contents