Alert.show(returnValue);
}else{
Alert.show("您的登录失败了","提示信
息",Alert.OK,this,null,null,Alert.YES);
}
}
]]>
</mx:Script>
<mx:Panel x="70" y="47" width="288" height="220" layout="absolute"
id="pa">
<mx:TextInput x="88" y="19" width="145" id="unameid"/>
<mx:TextInput x="88" y="69" width="145" id="pid"/>
<mx:Label x="10" y="21" text="name:" id="n1"/>
<mx:Label x="10" y="71" text="password:" id="pw"/>
<mx:Button x="110" y="119" label="提交" id="bt"
click="httpSendID.send()"/>
</mx:Panel>
<!—-下面是相当于面板更换,也就是组件清空之后换别的组件 -->
<mx:State id="s1" name="login">
<mx:RemoveChild target="{unameid}"/>
<mx:RemoveChild target="{pid}"/>
<mx:RemoveChild target="{bt}"/>
<mx:RemoveChild target="{n1}"/>
<mx:RemoveChild target="{pw}"/>
<mx:AddChild relativeTo="{pa}" position="lastChild">
<mx:target>
<mx:Label text="你已经成功登陆!" x="64" y="33"
fontSize="16" textAlign="center" fontStyle="normal" fontWeight="bold"
textDecoration="normal" color="#1031AB"/>
</mx:target>
</mx:AddChild>
<mx:SetProperty target="{pa}" name="title" value="登陆成功"/>
<mx:AddChild relativeTo="{pa}" position="lastChild">
<mx:Button x="95.5" y="83" label="退出登陆"
click="currentState=''"/>
</mx:AddChild>
</mx:State>
//下在就是提交到的 PHP
<?php
///获取源文件