Skip navigation
Home/Support/

Forums

215 Views 3 Replies Latest reply: Aug 2, 2010 12:58 AM by cannyshammy RSS
cannyshammy Calculating status... 8 posts since
Jan 11, 2010
Currently Being Moderated

Aug 1, 2010 12:15 PM

Expected Behaviour? [VIDEO]

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

  • Shongrunden Adobe Employee 1,356 posts since
    Jun 16, 2009
    Currently Being Moderated
    2. Aug 1, 2010 1:38 PM (in response to cannyshammy)
    Re: Expected Behaviour? [VIDEO]

    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>

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

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