Hello i have a problem. I am trying to make my website an application. I am having problem on the login page. I made the connection with the database but i cant log in as a user.
this is the code. Can anyone help me?

<?xml version="1.0" encoding="utf-8"?> 
<s:View xmlns:fx=""
        xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:employeeservice="services.employeeservice.*">

    <fx:Script>
        <![CDATA[
            protected function button_clickHandler(event:MouseEvent):void
            {
                User_LoginResult.token = employeeService.User_Login(username.text, password.text);
            }
        ]]>
    </fx:Script>


    <!-- Declarations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

    <fx:Declarations>
        <s:CallResponder id="User_LoginResult"/>
        <employeeservice:EmployeeService id="employeeService"/>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

    <s:Panel x="24" y="95" 
             width="390" height="200">

        <s:layout>
            <s:VerticalLayout gap="10" 
                              paddingTop="15" paddingLeft="15" paddingRight="15" paddingBottom="15"/>
        </s:layout>

        <s:TextInput prompt="Username:" id="username"/>

        <s:TextInput prompt="Password:" editable="true" id="password" />

        <s:Button id="button" label="Submit" click="button_clickHandler(event)"/>

    </s:Panel>

</s:View>

Dani AI

Generated

Quick diagnosis and immediate fix (for ): the call to your service starts an asynchronous request — assigning the AsyncToken only kicks the call off, it does not return the login result synchronously. Wire a result and fault handler to the CallResponder (or add an event listener) and read the responder’s lastResult (or the ResultEvent payload) when the call completes. The CallResponder/ResultEvent pattern is the supported way to handle service responses in Flex/AIR. (flex.apache.org)

A minimal pattern (use different ids than the example below if preferred):

<s:CallResponder id="loginResponder" result="onLoginResult(event)" fault="onLoginFault(event)"/>
protected function submitClick(event:MouseEvent):void {
  loginResponder.token = authService.loginAsync(usernameInput.text, passwordInput.text);
}

protected function onLoginResult(event:ResultEvent):void {
  var r:Object = loginResponder.lastResult;
  // inspect r, check success flag or returned user object and navigate
}

protected function onLoginFault(event:FaultEvent):void {
  trace("Service fault: " + event.fault.faultString);
}

Troubleshooting checklist (what to verify): confirm the client service type matches the server (RemoteObject/AMF vs HTTP/JSON/XML) and that the Zend endpoint is returning the format the Flex service expects; mismatch here will give empty results or conversion errors. Use a network inspector (Charles/Fiddler) to capture the actual request and response, and enable SSL proxying if the endpoint is HTTPS so the payload can be inspected. Also add clear fault logging and run the app in debug mode to see trace output. (flex.apache.org)

Context and caution (re: ): browser Flash was phased out and is not a valid mobile strategy; packaging as an AIR app is the right path for native mobile builds, but note that AIR platform support transitioned from Adobe to HARMAN in 2019 — check the current AIR SDK/runtime and support options before shipping. Also ensure authentication always goes over HTTPS and avoid exposing credentials in logs. (adobe.com)

Recommended Answers

All 3 Replies

You aware that Android and iPhones ditched support for Adobe Flash

the applications run with Adobe Air and Zend framework. If thats the same will you send me a link of how to make an application?

I do only native Android development so I will not be able to help you with this. Have look at for articles in regards of this. Also they do have their own forum where you can ask questions and get answers...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.