引言: 以下有部分内容来自网上, 这个实例中是将多种不同的应用结合在一起, 实现一个比较完整的操作
Flex 页面:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="initApp()"><!-- 发送HTTPService请求-->
<!--单击Datagrid中的一条记录时跳转的状态-->
<mx:states>
<mx:State name="itemInfo">
<mx:RemoveChild target="{dg}"/>
<mx:RemoveChild target="{fPage}"/>
<mx:RemoveChild target="{txt}"/>
<mx:RemoveChild target="{nPage}"/>
<mx:RemoveChild target="{lPage}"/>
<mx:RemoveChild target="{pPage}"/>
<mx:AddChild relativeTo="{panel}" position="lastChild">
<mx:Label x="49" y="48" text="Username:" color="#682F91"/>
</mx:AddChild>
<mx:AddChild relativeTo="{panel}" position="lastChild">
<mx:Label x="177" y="52" width="146" id="itemName" color="#6E4789"/>
</mx:AddChild>
<mx:AddChild relativeTo="{panel}" position="lastChild">
<mx:Label x="49" y="102" text="Password:" color="#35184A"/>
</mx:AddChild>
<mx:AddChild relativeTo="{panel}" position="lastChild">
<mx:Label x="177" y="102" width="146" id="itemPass" color="#4B1F6A"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Script >
<![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
[Bindable]
//自定义分页数据