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 6189199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:22:59+00:00 2026-05-24T02:22:59+00:00

I am using Flex and Actionscript 3, along with Webservices, rpc and a callResponder.

  • 0

I am using Flex and Actionscript 3, along with Webservices, rpc and a callResponder. I want to be able to, for example, say:

loadData1();  // Loads webservice data 1
loadData2();  // Loads webservice data 2
loadData3();  // Loads webservice data 3

However, Actionscript 3 works with async events, so for every call you need to wait for the ResultEvent to trigger when it is done. So, I might want to do the next request every time an event is done. However, I am afraid that threading issues might arise, and some events might not happen at all. I don’t think I’m doing a good job of explaining, so I will try to show some code:

    private var service:Service1;
    var cp:CallResponder = new CallResponder();

    public function Webservice()
    {
        cp.addEventListener(ResultEvent.RESULT, webcalldone);
        service = new Service1();
    }
    public function doWebserviceCall()
    {
        // Check if already doing call, otherwise do this:
        cp.token = service.WebserviceTest_1("test");    
    }   
    protected function webcalldone(event:ResultEvent):void
    {
        // Get the result
        var result:String = cp.lastResult as String;

        // Check if other calls need to be done, do those
    }

Now, I could ofcourse save the actions in an arraylist, but whose to say that the addToArrayList and the check if other calls are available do not mess eachother up, or just miss each other, thereby halting execution? Is there something like a volatile Arraylist? Or is there a completely different, but better solution for this problem?

  • 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-24T02:23:00+00:00Added an answer on May 24, 2026 at 2:23 am

    Use an AsyncToken to keep track of which call the returned data was for http://flexdiary.blogspot.com/2008/11/more-thoughts-on-remoting.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Flex Builder : I have created a new Actionscript Project. I want to
hello i want to apply tween motion on UIcomponents using actionscript in flex. i
I am using the flex SDK to compile actionscript 3 classes into an swf.
I am trying to parse JSON in an Adobe Flex app, using http://www.mikechambers.com/blog/2006/03/28/tutorial-using-json-with-flex-2-and-actionscript-3/'>This Tutorial
I have some experience of developing in Flex/Actionscript using Cairngorm framework. At that time
I recently started using Mac OS X for a flex/actionscript project and having a
I have a pure ActionScript project. I'm using Flex Builder on a Mac, Flex
I am implementing a simulated b/s stock data system. I am using flex and
I'm new to Actionscript. I'm developing a flex mobile project using the wikipedia api
I am using swfLoader to load external flash movies in my flex/actionscript code. If

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.