日期:2014-05-17 浏览次数:20897 次
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="398"
height="258"
title="Login"
close="titlewindow2_closeHandler(event)"
textAlign="left"
cornerRadius="35"
backgroundAlpha="0.0"
dropShadowVisible="false"
creationComplete="initApp()" backgroundColor="#E1E5EB">
<s:layout>
<s:VerticalLayout horizontalAlign="center" verticalAlign="middle" paddingLeft="0" paddingTop="0"/>
</s:layout>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
.myFormItemLabelStyleName{
fontWeight : bold ;
}
</fx:Style>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<s:RemoteObject id="ud" destination="userlogin" endpoint="/iaas/messagebroker/amf">
<s:method name="login" result="onResult(event)" fault="Alert.show(event.fault.message.toString())" ></s:method>
</s:RemoteObject>
</fx:Declarations>
<fx:Script>
<![CDATA[
//省略
]]>
</fx:Script>
<mx:Form width="375" height="193" dropShadowVisible="true" backgroundColor="#E1E5EB" paddingLeft="50" paddingTop="40" paddingRight="16">
<mx:FormItem label="userName">
<s:TextInput id="txtUsername"/>
</mx:FormItem>
<mx:FormItem label="password">
<s:TextInput id="txtPassword" displayAsPassword="true"/>
</mx:FormItem>
<mx:FormItem label="check code:">
<mx:TextInput id="txtCheckCode" width="{txtUsername.width}"/>
</mx:FormItem>
<mx:FormItem label="Label" id="lblCheckCode">
<mx:Label text="看不清楚?" click="initApp();" color="#1F45C3"/>
</mx:FormItem>
<mx:FormItem label="">
<s:Button label="Login" click="button1_clickHandler(event)"/>
</mx:FormItem>
</mx:Form>
</s:TitleWindow>
?