flex4例子,Flex例子

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
skinClass="skins.AppSkin"
creationComplete="employeeService.send()">
<!--
skinClass="skins.AppSkin"导入皮肤
creationComplete="employeeService.send()" 使用creationComplete系统事件来检索employeeService发送的xml数据
send()方法会在创建应用程序时初始化XML数据检索
-->
<fx:Style source="stytles.css"/>
<!-- 导入CSS -->
<fx:Declarations>
<s:HTTPService id="employeeService"
url="employees.xml"/>
<!--HTTPService检索Http协议GET和POST的数据
url远程的(http://adobetes.com/f4iaw100/remoteData/employees.xml)本地的都可以-->
</fx:Declarations>
<s:Label x="342" y="52" text="用户注册" styleName="addHeader"/>
<mx:Form x="342" y="120">
<mx:FormItem label="员工">
<s:DropDownList id="dropDownList"
dataProvider="{employeeService.lastResult.employees.employee}"
labelField="lastName"/>
<!-- lastResult服务对象属性中提供所有数据,然后通过XML节点访问这些数据-->
</mx:FormItem>
<mx:FormHeading label="个人信息"/>
<mx:FormItem label="工作电话">
<s:TextInput text="{dropDownList.selectedItem.phone}"/>
<!--DropDownList控件的selectedItem属性包含为控件选定项存储的所有数据-->
</mx:FormItem>
<mx:FormItem label="个人电话">
<s:TextInput/>
</mx:FormItem>
<mx:FormHeading label="请求信息"/>
<mx:FormItem label="请求时间">
<mx:DateChooser/>
</mx:FormItem>
<mx:FormItem label="接收时间">
<mx:DateChooser/>
</mx:FormItem>
<mx:FormItem >
<s:Button label="提交" />
</mx:FormItem>
</mx:Form>
<s:VideoDisplay source="http://www.adobetes.com/f4iaw100/ex1_02_video.flv" width="255" height="148" x="639" y="157"/>
<s:VideoPlayer x="639" y="309" width="257" source="http://www.adobetes.com/f4iaw100/ex1_02_video.flv" height="148" muted="true"/>
</s:Application>
Tags: 

延伸阅读

最新评论

发表评论