Search code examples
apache-flexonmouseclick

Global Coordinate Value on Mouse Click in Flex


In Flex, I am using the following code:

I am using event.event.localX to get the x-axis but it is with reference to local coordinates. How can I get or pass the value of the HBox's xAxis that is clicked by the user so that I can add it in the xAxis of the local coordinate.

In other words, I need the global coordinate value? (i.e. x-axis & y-axis)


Solution

  • MouseEvent has stageX and stageY properties.