Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3990940
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:33:18+00:00 2026-05-20T06:33:18+00:00

Does anyone know of any good resources that fully explain how functions and results

  • 0

Does anyone know of any good resources that fully explain how functions and results will fire in an Adobe AIR app where multiple things are happening at once?

As a simple test, I’ve created a single service that I just keep changing the url of, then issuing a send(). It seems that no matter how many send() calls I put in, all of these get executed before the ‘result’ eventListener function gets called for the first time.

Is this how it works? i.e. the current function gets fully executed, with the async returns queueing up to be processed after AIR has finished what it’s currently doing.

Likewise, if the user does something while all this is going on, I presume their request goes to the back of the queue as well?

All that makes sense, but I’m just wondering if it’s documented anywhere.

While I’m on one, is it recommended practice to reuse the same HTTPService in this way, or is it better to create one for each concurrent transaction? Just because it works, doesn’t mean it’s the right thing to do…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:33:18+00:00Added an answer on May 20, 2026 at 6:33 am

    I’m not aware of any documentation that explains this, but I can confirm that code blocks get executed before async calls are made, or at least before their result is being processed. If it didn’t work that way, you would for instance not always be able to attach a responder to a token of a service call, because the result might already have been processed.

    var token:AsyncToken = myService.someMethod();
    token.addResponder(new Responder(resultHandler, faultHandler));
    

    Developers coming from other platforms find this strange as they would expect the assignment of the responder to be too late.

    So while I don’t have an official explanation about the technical details inside the Flash Player, I can assure that it works this way.

    If the user does something while a call is pending, the new request will indeed just be added as a new asynchronous call. Note that we can’t realy speak of a queue, as there is no guarantee that the response of the first call comes in before the response of the second call. This depends on how much time the actual requests take.

    You can perfectly reuse an HTTPService instance.

    PS: Based on this, we were able to build the Operation API in Spring ActionScript. It is basically an API that allows you to execute asynchronous processes in a uniform way, without having to worry about the details of the actual async process.

    The following code executes an async process and attaches a handler to it. This is also something that puzzles many developers at first, for reasons similar to the asyncToken situation.

    var operation:IOperation = doSomeOperation();
    operation.addCompleteListener(aCompleteHandler);
    operation.addErrorListener(anErrorHandler);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of any good image resizing libraries that will handling resizing large
Does anyone know of a good website, book or any other resources that would
Does anyone know any good online embedded software programming with C or assembler resources?
Does anyone know any good tool that I can use to perform stress tests
Does anyone know any good resources with tasks or problems to get practice in
does anyone know of any good resources for learning JSON? And preferably, if it
Does anyone know any good tutorial about using NAnt for native code build process
Does anyone know any good and free .NET Windows Controls Library
Does anyone know of any good tutorials on ADO.NET Entity Framework? There are a
Does anyone know of any good tools (I'm looking for IDEs) to write assembly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.