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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:10:42+00:00 2026-05-27T09:10:42+00:00

On runtime, I create multiple instants of the Group class, like this: var groupArtist:Group

  • 0

On runtime, I create multiple instants of the Group class, like this:

var groupArtist:Group = new Group();
groupArtist.id = artistXML.id;
groupArtist.width = 150;
groupArtist.height = 170;
groupArtist.clipAndEnableScrolling = true;
groupArtist.layout = new VerticalLayout();

I add an eventlistener:

 groupArtist.addEventListener(MouseEvent.CLICK, viewDetails);

This is the eventlistener:

private function viewDetails(event:MouseEvent):void
{
    Alert.show(event.target.id);
}

But it’s not working. How can I get the id of the clicked Group?
I’ve checked, and the Id is added correctly to the groupinstances.

  • 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-27T09:10:42+00:00Added an answer on May 27, 2026 at 9:10 am

    Try this:

    Alert.show(event.currentTarget.id);
    

    What you’re alerting is the “target” that was clicked, and associated in the “MouseEvent.CLICK” event, and you probably want the “currentTarget”. As Flex Documentation explains on this, “Every Event object has a target and a currentTarget property that help you to keep track of where it is in the process of propagation. The target property refers to the dispatcher of the event. The currentTarget property refers to the current node that is being examined for event listeners.“.

    The Most Interesting Man in the World doesn’t normally code in Actionscript… but when he does, he uses event.currentTarget.

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

Sidebar

Related Questions

Is possible create (register) a new class in runtime using delphi. I have a
How do we create multiple thread during runtime in C programming language? If we
I would like to create simple objects at runtime (textbox, label, etc) and add
I'm trying to dynamically create buttons at runtime with PyQT4.7 However, this being my
I'm trying to create a class that can instantiate arrays at runtime by giving
I have been curious about dynamically create class at runtime in C# and stumbled
Is it possible to have a class X and create multiple tables from it
I want to create this TableLayoutPanel (C# in WinForms - programatically created at runtime!)
I would like to create something like this : I have a module that
I need to obtain the Thread Id from a window create in runtime with

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.