1 Reply Latest reply on Oct 22, 2009 9:18 PM by Roland Tritsch

    How to get a click event on a Path?

    Roland Tritsch

      hi all,


      I am using Flash Builder 4 Beta 2.


      I need to get a click event on a Path object. The source code below displays a red triangle.

      Obviously, if I define a click="" on the Graphics object the entire Graphics Area becomes "clickable".

      That is not what I want. I just want the triangle to become "clickable"?


      Any ideas, how to make that happen?


      Regards ...





      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"


         xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768"


      <s:Panel title="Roland's FXG Example">


      <s:Graphic buttonMode="true" click="trace('ok')">

      <s:Path data="M 100 100 L 100 300 L 300 100 L 100 100">




      <s:MoveSegment x="100" y="100"/>

      <s:LineSegment x="100" y="300"/>

      <s:LineSegment x="300" y="100"/>

      <s:LineSegment x="100" y="100"/>




      <s:Stroke color="black" weight="10"/>



      <s:SolidColor color="red"/>