4,327
社区成员




<?xml version="1.0"?>
<!-- Simple example to demonstrate the ViewStack layout container. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function loginHandle():void{
if("jinxinxin1314"==setUserName.text &&"1314"==setPassword.text ){
panel1.visible=false;
myViewStack.visible=true;
getUserName.text=setUserName.text;
getPassword.text=setPassword.text;
}
}
]]>
</mx:Script>
<mx:Panel x="311.5" y="127" width="401" height="277" layout="absolute" title="用户登录" fontSize="12" id="panel1" horizontalAlign="left" verticalAlign="top" borderColor="#000000" highlightAlphas="1">
<mx:Label x="66" y="52" text="用户名" fontSize="15" width="54" height="26"/>
<mx:Label x="66" y="96" text="密 码" fontSize="15" width="54" height="26"/>
<mx:TextInput x="146" y="50" id="setUserName" fontSize="15"/>
<mx:TextInput x="146" y="94" id="setPassword" displayAsPassword="true" fontSize="15"/>
<mx:Button x="106" y="192" label="登录" id="btnLogin" fontSize="15" click="loginHandle()"/>
</mx:Panel>
<mx:ViewStack x="66" y="52" id="myViewStack" width="500" height="200" borderStyle="solid" visible="false">
<mx:Canvas id="cas" backgroundColor="#FFFFCC" label="canvas页面" width="100%" height="100%">
<mx:Label x="66" y="52" text="用户名" fontSize="15" width="54" height="26"/>
<mx:Label x="66" y="96" text="密 码" fontSize="15" width="54" height="26"/>
<mx:Label x="146" y="50" id="getUserName" fontSize="15"/>
<mx:Label x="146" y="94" id="getPassword" fontSize="15"/>
</mx:Canvas>
</mx:ViewStack>
</mx:Application>