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

  • SEARCH
  • Home
  • 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 248757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:22:11+00:00 2026-05-11T21:22:11+00:00

When, in ActionScript, an event is dispatched: foo.addEventListener(some event, someHandler); foo.dispatchEvent(new Event(some event)); At

  • 0

When, in ActionScript, an event is dispatched:

foo.addEventListener("some event", someHandler);
foo.dispatchEvent(new Event("some event"));

At what point are the event handlers executed?

I ask because I caught this at the end of an Adobe developer guide:

Notice that some properties are assigned to the [AsyncToken] after the call to the remote service is made. In a multi-threaded language, there would be a race condition where the result comes back before the token is assigned. This situation is not a problem in ActionScript because the remote call cannot be initiated until the currently executing code finishes.

But I could not find any information on what they meant by “currently executing code”.


See also: ActionScript event handler execution order

  • 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-11T21:22:11+00:00Added an answer on May 11, 2026 at 9:22 pm

    Actionscript is a single threaded event driven language. Notice how there are no “main” methods in Actionscript. All code belongs in events, eg. initialization code tends to be placed in response to “creationComplete” events. Once the code in that event handler is run, the next event is executed. So if you did:

    private function someOtherHandler():void 
    {
        foo.addEventListener("some event", someHandler);
        while(true) { ... spin wheels ... }
    }
    

    No other handler would be able to run because the currently executing code (the infinite loop) would never complete.

    Note that Flash probably uses multiple threads internally, but that is abstracted from the developer.

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

Sidebar

Related Questions

Consider The Following Actionscript/Flex code: var LC:LocalConnection=new LocalConnection(); LC.addEventListener(StatusEvent.STATUS, Status); LC.send('A', 'SomeMethodName', 'Message'); LC.send('B',
On occasion, I have wanted to push a closure onto ActionScript's event stack so
I have two functions in an ActionScript class, they are: private function loaderCompleteHandler(event:Event):void {
What is the best way to create a 'global event' in flex/actionscript - preferably
is it posible to have callable objects on ActionScript? For example: class Foo extends
When one call Clipboard.generalClipboard.getData() in ActionScript outside of Event.PASTE processing function it fails with
I am new to Flex and needed some help setting up Web service client.
in c# what is Event? Is it similar to ActionScript Event ? Is it
Event.MOUSE_LEAVE is great in Actionscript 3, but it doesn't seem to fire if the
I'm new to actionscript. I'm trying to make a menusystem that will jump to

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.