
April 23rd, 2009, 01:15 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 1
Time spent in forums: 8 m 51 sec
Reputation Power: 0
|
|
|
My HTTPService help needed
My HTTPService keeps giving this error
Quote: Could not resolve <pass> to a component implementation.
Could not resolve <pass> to a component implementation.
Could not resolve <user> to a component implementation.
Could not resolve <user> to a component implementation. |
when i try to sent using php and flex
Main code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*">
<mx:states>
<mx:State name="Logged In">
<mx:SetProperty target="{panel1}" name="height" value="95%"/>
<mx:SetProperty target="{panel1}" name="title" value="Members Section"/>
<mx:SetProperty target="{panel1}" name="width" value="95%"/>
<mx:RemoveChild target="{Submit}"/>
<mx:RemoveChild target="{label1}"/>
<mx:RemoveChild target="{label2}"/>
<mx:RemoveChild target="{password}"/>
<mx:RemoveChild target="{username}"/>
<mx:RemoveChild target="{register_send}"/>
<mx:RemoveChild target="{register_page}"/>
</mx:State>
<mx:State name="register">
<mx:RemoveChild target="{username}"/>
<mx:RemoveChild target="{password}"/>
<mx:RemoveChild target="{Submit}"/>
<mx:RemoveChild target="{register_page}"/>
<mx:RemoveChild target="{panel1}"/>
<mx:AddChild position="lastChild">
<ns1:register x="451" y="253">
</ns1:register>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Panel width="250" height="200" layout="absolute" title="Login System" horizontalCenter="20" verticalCenter="-10" id="panel1">
<mx:TextInput x="10" y="37" id="username"/>
<mx:TextInput horizontalCenter="-25" verticalCenter="24" id="password" displayAsPassword="true"/>
<mx:Label x="10" y="10" text="Username:" id="label2"/>
<mx:Label x="10" y="67" text="Password:" id="label1"/>
<mx:Button x="10" y="123" label="Submit" id="Submit" click="login_user.send(); "/>
<mx:Button x="105" y="123" label="Register:" id="register_page" click="currentState='register'"/>
</mx:Panel>
<mx:HTTPService id="login_user" result="checkLogin(event)" method="POST" url="http://www.2ss-dr.com/flex/login.php" useProxy="false">
<mx:request xmlns="">
<username>{username.text}</username>
<password>{password.text}</password>
</mx:request>
</mx:HTTPService>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
private function checkLogin(evt:ResultEvent):void
{
if(evt.result.loginsuccess == "yes")
{
currentState = "Logged In";
}
if(evt.result.loginsuccess == "no")
{
mx.controls.Alert.show("Invalid username/password");
}
}
]]>
</mx:Script>
</mx:Application>
Module code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300">
<mx:HTTPService id="register_user" method="POST" url="http://www.2ss-dr.com/flex/register.php" useProxy="false">
<user>{user.text}</user>
<pass>{pass.text}</pass>
</mx:HTTPService>
<mx:Panel x="0" y="0" width="400" height="300" layout="absolute" title="Register" id="user_register">
<mx:Label x="10" y="28" text="Username:" id="user_label"/>
<mx:TextInput x="10" y="54" id="user"/>
<mx:TextInput x="10" y="110" id="pass" displayAsPassword="true"/>
<mx:Button x="10" y="150" label="Register" id="register_button" click="register_user.send();"/>
<mx:Label x="10" y="84" text="Password:" id="pass_label"/>
</mx:Panel>
</mx:Module>
|