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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:31:40+00:00 2026-06-07T07:31:40+00:00

I am trying to build a custom modal dialog in flash. The way I

  • 0

I am trying to build a custom modal dialog in flash. The way I chose to go about it is create a movie clip class with the UI for the dialog with a function to add buttons to it. I then size the ui after all the buttons are added and display it on the screen.

It works up to this point. Now I want whatever called this dialog to wait until a button is picked before the user can do anything else. Something along the lines of:

var dialog:MyDialog = new MyDialog();
dialog.addButton(new MyButton("Foo"));
dialog.addButton(new MyButton("Bar"));
var result:String = dialog.show(); // we will wait here

In the dialog.show I wish to show the movie clip and then wait for the user to click and of the buttons on the dialog before returning. The MouseEvent.CLICK event is asynchronous though so I don’t know how to wait for it.

An alternative is creating a whole custom complete event for the dialog that is added to the screen that is calling the dialog which I can continue the logic in and have a boolean that disables other input, but that is a pretty big hassle and I’ve never done anything like it.

  • 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-06-07T07:31:41+00:00Added an answer on June 7, 2026 at 7:31 am

    What your describing is a misconception of what synchronous and asynchronous is.

    When the dialog comes up, you still want the user to be able to hit the dialog button. If the procedure was synchronous then the entire program would freeze as the routines for the mouse clicking actions would never arrive. Remember, flash is single threaded.

    The thread that has the popup is sharing the same thread as the underlying app.

    The easiest thing is just to have an event on the buttons that dispatch some close event that you can listen for in your application. No custom event classes are needed.

    dispatchEvent(new Event("close"))
    

    as an example.

    If your worried about the user interacting with parts outside of the application, then you can simply draw a rectangle behind the popup with mouseEnabled true, or check out using Flex’s model dialog classes.

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

Sidebar

Related Questions

I'm trying to build custom AuthorizeAttribute, so in my Core project (a class library)
I'm trying to build a custom clock view in Android. See image http://twitpic.com/1devk7 So
I'm trying to build a custom segue, but i can't seem to get the
I'm fairly new to Android, and am trying to build a custom component in
I am trying to build a simple custom editor in the Eclipse environment. To
I'm trying to build a menu using a UItableView with Custom cells which have
Im trying to create a custom version of the RequiredAttribute to replace the built
I'm trying to create a custom field for a ModelForm. I'm extending from ModelMultipleChoiceField
I'm trying to build a custom activity for SharePoint 2010 to be used in
I'm trying to build a custom framework but for some reason, there is never

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.