Skip navigation
cannyshammy
Currently Being Moderated

Expected Behaviour? [VIDEO]

Aug 1, 2010 12:15 PM

Hi Guys,

 

I have just come accros an issue with a rect inside of a group. Im trying to listen for mouse overs when rolling over the rect only but im getting rollover events even when rolling over white space.

 

Can anyone confirm if this is the correct behaviour for GraphicElements within groups?

 

 

Code is:

 

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

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

   xmlns:s="library://ns.adobe.com/flex/spark"

   xmlns:mx="library://ns.adobe.com/flex/mx">

 

 

<s:Group rollOver="trace('ya')">

<s:Rect x="100" y="100" width="20" height="20">

<s:fill>

<s:SolidColor color="0x00ff00" />

</s:fill>

</s:Rect>

</s:Group>

 

 

</s:WindowedApplication>

 

Cheers,

Mike

  • Currently Being Moderated
    Adobe Employee
    Aug 1, 2010 1:38 PM

    Group.mouseEnabledWhereTransparent might be helpful to you:

     

        <s:Group mouseEnabledWhereTransparent="false" rollOver="trace('ya')">
            <s:Rect x="100" y="100" width="20" height="20">
                <s:fill>
                    <s:SolidColor color="0x00ff00" />
                </s:fill>
            </s:Rect>
        </s:Group>
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points