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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:20:34+00:00 2026-05-11T14:20:34+00:00

I thought I had custom events nailed in Flex, but seemingly not. I am

  • 0

I thought I had custom events nailed in Flex, but seemingly not. I am trying to loosely couple my application by dispatching events between classes instead of using horrid parent.parent.parent statements.

I have a ComboBox inside a custom HBox class… for simplicity I am doing the following

public function onComboBoxChange(event:MouseEvent):void {     trace('dispatching event');     dispatchEvent(new Event('hello')); } 

I have a custom List class that I would like to respond to the event…

public function CustomList() {     //...     this.addEventListener(FlexEvent.INITIALIZE, onInit); }  private function onInit(event:FlexEvent):void {     this.addEventListener('hello', onHello); }  private function onHello(event:Event):void {     trace('oh hello'); } 

However the event listener is never called.

Both CustomList and CustomHBox have the same parent.

I was under the impression you could dispatchEvent from any object and all other active objects would be able to listen for it. Not that simple?

Thanks!

  • 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. 2026-05-11T14:20:35+00:00Added an answer on May 11, 2026 at 2:20 pm

    Your list either needs to call addEventListener(‘hello’) on the combobox directly, or the combobox needs to dispatch the event with a bubbles argument of true.

    Your concept of events is missing ‘bubbling’ you can read more about events in flash on the Adobe site.

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

Sidebar

Related Questions

I had thought I was clever. But in light of recent discoveries, I'm not
I thought I had resolved this but I obviously haven't and was hoping someone
I thought I had this figured out but it turns out I'm just deleting
Alright, I thought I had this whole setTimeout thing perfect but I seem to
I'm really not sure how to approach this, but I am subscribing to events
This might seem obvious but I've had this error when trying to use LINQ
I thought I had it figured out but now I'm missing something. First I
I thought I had this one sorted but I have run into a snag.
I had thought I could enumerate the types using IMetaDataImport.EnumTypeDefs and for each of
I had thought about decorating various control items with attributes to declare group ownership,

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.