If you need to go lower level you can also grab the path's display object
and manually turn on interactivity.
public static function makeInteractive(element:Object, interactive:Boolean
= false):void {
if (element is GraphicElement) {
GraphicElement(element).alwaysCreateDisplayObject =
!interactive;
if (GraphicElement(element).displayObject) {
Sprite(GraphicElement(element).displayObject).mouseEnabled
= !interactive;
Sprite(GraphicElement(element).displayObject).buttonMode =
!interactive;
}
}
}
On Mon, Aug 15, 2016 at 11:34 AM, scott matheson <[email protected]> wrote:
> thanks my silly i used a group, i give it a go
>
>
>
> > On 15 Aug 2016, at 15:02, OK <[email protected]> wrote:
> >
> > ScottM wrote
> >> or is there a someway, to containing this path in a object capable of
> >> generating event but but staying within
> >
> > If I understand you right, just wrapping your path inside a graphic
> > component should do the trick:
> >
> > <s:Graphic buttonMode="true"
> > mouseEnabledWhereTransparent="false"
> > useHandCursor="true"
> > click="Alert.show('test click');"
> mouseOver=""Alert.show('test mouse
> > over');">
> > <s:Path id="g5" x="128.303" y="0"
> winding="nonZero" data="M0 26.9082
> > 19.6162 38.2334C23.4395 31.5615 25.1646 27.3408 27.1924 19.7744 29.2192
> > 12.21 29.8354 7.69238 29.8604 0L7.20996 0C7.18457 5.38086 6.7417 8.58301
> > 5.31396 13.9121 3.88525 19.2432 2.66748 22.2383 0 26.9082Z">
> > </s:Path>
> > </s:Graphic>
> >
> > Source:
> > http://blog.flexexamples.com/2010/03/22/creating-a-simple-im
> age-map-in-flex-4/
> >
> > HTH,
> > Olaf
> >
> >
> >
> >
> > --
> > View this message in context: http://apache-flex-users.23333
> 46.n4.nabble.com/Groups-tp13290p13291.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>