3 Replies Latest reply on Aug 17, 2009 8:36 AM by msakrejda

    Degrafa: Mouse events for GeometryGroup members?

    msakrejda Level 4

      I have an application more or less like the following:

       

          <mx:Script>           
                  private function handleSelection(e:MouseEvent):void {
                      Alert.show("You clicked " + e.target + " " + e.target.id);
                  }

              ]]>
          </mx:Script>
          <mx:Panel id="topPanel" width="100%" height="100%" mouseEnabled="true">
                   <Degrafa:Surface id="mySurface" width="100%" height="100%">
                      <Degrafa:GeometryGroup id="geometryLayer" x="0" y="0" scaleX="1" scaleY="1" mouseChildren="true"
                          click="handleSelection(event)">
                          <Degrafa:strokes>
                              <Degrafa:SolidStroke color="#8EB3E7" alpha=".75" id="lineStroke"/>
                          </Degrafa:strokes>
                          <Degrafa:fills>
                              <Degrafa:SolidFill color="#0000FF" id="solidFill"/>
                          </Degrafa:fills>
                          <Degrafa:Circle radius="30" centerX="100" centerY="100" stroke="{lineStroke}" fill="{solidFill}"/>

                          <Degrafa:Circle radius="30" centerX="200" centerY="200" stroke="{lineStroke}" fill="{solidFill}"/>
                      </Degrafa:GeometryGroup>
                  </Degrafa:Surface>           
          </mx:Panel>

       

      However, no matter which circle I click on, the alert says I clicked on geometryLayer. As far as I can tell, I'm not doing anything too terribly different from the Map demo, which *does* have this behavior (albeit it seems to be using a somewhat older Degrafa--I just downloaded the latest Beta).

       

      Any ideas?