Two days ago Cnblog See Flex I didn't expect it to be deeply attracted to me for a try out of a strange heart. Whether it is UI I feel very good both in appearance and in data exchange. Remoting, httpservice, WebService And other components for flexible data exchange with other platforms. It is also convenient to use dynamic scripts. Flex builder2 The help documentation is also very good, but it is a pity that it is hard to read English (my English level is poor)
it took about a day to use it. In fact, it is easy to use. httpservice and WebService example. However, the following describes how to create a beautiful dropdownlist , let's take a look:
FlexThe provided control model is very simple (you can say it is as simple as you don't believe) when creating these control combinations ). Check the entireMxmlFile Code:
<? XML version = "1.0" encoding = "UTF-8"?>
<Mx: Application initialize = "oninit ()"Xmlns: MX = "http://www.adobe.com/2006/mxml" layout = "absolute">
<Mx: SCRIPT>
<! [CDATA [
Import MX. rpc. Soap. WebService;
Import MX. rpc. http. httpservice;
Public var initdg: array = [
{ARTIST: 'pavement ', album: 'slanted and enchanted', price: 11.99 },
{ARTIST: 'pavement ', album: 'brighten the corn', price: 11.99}
];
Function oninit (): void
{
Removechild (mygrid );
Selectitem. popup = mygrid;
}
Function itemchange (): void
{
Selectitem. Label = mygrid. selecteditem. album;
}
]>
</MX: SCRIPT>
<Mx: DataGrid id = "mygrid" dataprovider = "{initdg }"X = "10" Y = "40"Change = "itemchange ()" width = "326" Height = "126">
<Mx: columns>
<Mx: datagridcolumn datafield = "artist"/>
<Mx: datagridcolumn datafield = "album"/>
<Mx: datagridcolumn datafield = "price"/>
</MX: columns>
</MX: DataGrid>
<Mx: popupbutton x = "10" Y = "10" id = "selectitem"/>
</MX: Application>
Actually, you can useHttpservice, WebServiceAnd other components and database data binding, you can also add flexible data overhead functions.
Have time to write some information about callingWebServiceQuery data and bind the display result.
IfFlexIf you are interested, you can find out that it will not take too long to get the result.