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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:17:12+00:00 2026-06-03T23:17:12+00:00

I am building an RIA application using Flex 4.6 that contains a main borderContainer

  • 0

I am building an RIA application using Flex 4.6 that contains a main borderContainer (page) that can contain some other borderContainers (graphic or text elements).

I added an event listener on the page to listen to click events:

page.addEventListener(MouseEvent.CLICK, clickHandler, true);

clickHandler looks like this:

private function clickHandler(event:MouseEvent):void
{
    // Remove event listeners
    page.removeEventListener(MouseEvent.CLICK, clickHandler, true);

    // Get click position
    objX = event.localX;
    objY = event.localY;
}

My problem is that although the event’s currentTarget is always the page (normal), the target can either be the page or one of its children, and then localX doesn’t give me the position on the page but on the child.

Is there a way to make sure the page is always the target of the event? Something like stopping the capturing phase on the page so it doesn’t go deeper?

Thanks in advance for your help

Darrel

  • 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-03T23:17:14+00:00Added an answer on June 3, 2026 at 11:17 pm

    I think you may be asking the wrong question. As I understand it, you want the x/y position relative to ‘page’. You can use the DisplayObject#globalToLocal() function to find this.

    Just take the the global coordinates and convert them to local coordinates relative to ‘page’:

    var coordinates:Point = new Point(event.stageX, event.stageY);
    coordinates = page.globalToLocal(coordinates);
    objX = coordinates.x;
    objY = coordinates.y;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building an application based on Ria Services. Amongst the default methods that
I am building a Silverlight 3 application that uses .NET RIA Services. This application
I am building a WCF RIA service used for Silverlight application. I am using
building a site using PHP and MySQL that needs to store a lot of
Building decent RIA data-intensive crud-like application is still hard. In spite of existence tons
How do you capture errors that happen on client side when building RIA apps
Building a rails B2B application that will have various users. I'm pretty clear on
I'm building a small experimental application using BlazeDS AMF, Java and Hibernate, and I
I am building a application with these patterns: Silverlight, RIA, EF, Prism, SL Unit
I am building a desktop application that will be used on local network, 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.