2 Replies Latest reply on Feb 14, 2012 11:10 AM by 56231

    Can I mouse over a group and cause another group to do something?

    56231 Level 1

      When I mouse over id=wholeGroup, I want group rect47 to become more visible by changing its alpha value.

      Can someone help me understand how to do this? Thanks.

       

      Here is what I have so far, but I am getting multiple errors.

       

      1067: Implicit coercion of a value of type String to an unrelated type Number.

      1119: Access of possibly undefined property mouseOver through a reference with static type spark.components:Group.

       

      <fx:Script>
        <![CDATA[
           private function showYourSelf():void {
                if (wholeGroup.mouseOver==true) {
                     rect47.alpha="1.0";
                 } else {rect47.alpha="0.3";}
            }
        ]]>
      </fx:Script>

      <s:Group id="wholeGroup" mouseOver="showYourSelf()" >

        <s:Group id="rect47">
            <s:Rect>
               <s:fill>
                    <s:SolidColor color="0x474747"/>
                </s:fill>
           </s:Rect>
        </s:Group>

        <s:Group id="rect87">
           <s:Rect>
               <s:fill>
                    <s:SolidColor color="0x878787"/>
                </s:fill>
           </s:Rect>
        </s:Group>

      </s:Group>