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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:42:33+00:00 2026-05-15T03:42:33+00:00

I got a europe map designed in flash (1 movieclip, 1 frame, really simple),

  • 0

I got a europe map designed in flash (1 movieclip, 1 frame, really simple), which contains the map as drawing objects directly inside the scene and in addition some specific countries as clickable buttons. So far it’s working fine. What I need now is to make all the other drawing objects clickable without having to edit and script each object. I’m thinking about something like this (pseudo code):

foreach(obj in MovieClip) {
    if(obj !typeof(Button)) {
        obj.addEventListener(MouseEvent.MOUSE_DOWN, genericClickListener);
    }
}

I just don’t know the syntax how to achieve that. Could anybody give me a hint?

Thanks,
Mathias

  • 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-15T03:42:34+00:00Added an answer on May 15, 2026 at 3:42 am

    Try this:

    function genericClickHandler(event:Event):void {
      trace('clicked');
    }
    
    // loop through all children
    for (var i:int = 0; i < numChildren; i++) {
      var child:Object = getChildAt(i) as Object; 
      // check if display is not a button and check if it has a buttonMode property
      if (!(child is SimpleButton) && child.hasOwnProperty('buttonMode')) {
        child.buttonMode = true;
        child.addEventListener(MouseEvent.CLICK, genericClickHandler, false, 0, true);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

got a PictureBox (called i_MC) and i draw a simple image (m_ImgMCN) on it
Got a strange problem created a little stored proc which need to execute a
Got a c#.net app which I need to modify. The query at the moment
Got issue My javascript array contains dates for ex. 19.4.2003,28.11.1997,3.1,,29.6,7.11.2008 (date-month-year). As you can
So we've got a legacy system that tracks places with IDs like Europe/France/Paris, and
I'm really new to testing so go easy on me. I've got Seleneium working
Got a real simple question but can't figure out the solution. Got following code.
I need to display a pretty image of a map of Europe, and I
Got this really stupid problem: Can find the proper name for the android folder
Got a LinearLayout containing a textview and an edittext. The LinearLayout is inside a

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.