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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:01:25+00:00 2026-05-25T10:01:25+00:00

I have a custom component, containing a List displaying items from an XMLListCollection: [Bindable]

  • 0

I have a custom component, containing a List displaying items from an XMLListCollection:

        [Bindable]
        private var _games:XMLListCollection = new XMLListCollection();

…

        <s:List itemRenderer="Game" dataProvider="{_games}"
          change="gameClicked(event)">
            <s:layout>
                <s:TileLayout />
            </s:layout>
        </s:List>

where XML data can look like this:

              <game id="0"/>
              <game id="9012">
                <user id="VK48058967" />
                <user id="MR14315189992643135976" />
                <user id="OK10218913103" />
              </game>
              <game id="9013">
                <user id="OK151358069597" />
                <user id="OK515549948434" />
              </game>

and the screenshot like this (representing joinable games with up to 3 players):

enter image description here

My problem is, that the change-Event listener is not only fired, when an item is clicked by mouse, but also when arrow keys on the keyboard are pressed:

        private function gameClicked(event:IndexChangeEvent):void {
            var game:XML = event.currentTarget.selectedItem as XML;
            if (game == null)
                return;
            Alert.show("Clicked game: " + game.@id);
            dispatchEvent(new PrefEvent(PrefEvent.GAME_CLICKED, game.@id));
        }

Also if I click twice, only 1 mouse click will cause my custom event to be dispatched (because obviously there is no change between the items).

Does anybody please know, how to make my List only react to mouse clicks?

UPDATE:

Yes, I’ve tried using “change” event for the List before, but then I have the problem that it is fired, even if the List scrollbar is clicked.

  • 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-25T10:01:26+00:00Added an answer on May 25, 2026 at 10:01 am

    Erm, yourList.addEventListener(MouseEvent.CLICK, onClick)? Or you can just use the inline event in MXML. This listens for all clicks within the list.

    You might want to just have a custom item renderer have it’s own click handler and dispatch a custom event that bubbles up where you can listen for it up the display list, so it can be more specific.

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

Sidebar

Related Questions

I have written a new custom component derived from TLabel. The component adds some
I have a List with a custom ItemRenderer. The ItemRenderer contains a Checkbox and
I have a custom component where I have implemented INotifyPropertyChanged and IBindableComponent . However,
So I have a module in flex in which I add a custom component.
I have created a custom facelets component and I need to set some value
I have created a small flash CS4 project that has a few custom components
I have a solution with many projects. One project contain few custom components. One
I have custom coded several enterprise applications for mid to large organizations to use
I have custom errors configured in my web.config, but IIS 6.0 is returning the
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For

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.