사용자 이름을 가리키면 약간의 드롭 다운 영역을 보여주는 맞춤 구성 요소를 만들고 있습니다. 나는 두 개의 주를 사용하고 있는데, 내 드롭 다운 상자를 위아래로 움직입니다.마우스 위로 맞춤 드롭 다운
내 문제는 내가 사용자 이름을 남긴 후에 구성 요소 레벨 Group
을 떠날 것이라고 생각합니다. 그런 다음 두 번째 레벨 그룹 (내 드롭 다운)이 사라집니다.
내 마우스 오버 기능의 callLater
에있는 구성 요소 레벨 Group
에 이벤트 처리기를 다시 연결했지만 작동하지 않았습니다.
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
mouseOver="groupLogIn_mouseOverHandler(event)"
mouseOut="groupLogIn_mouseOutHandler(event)"
>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import spark.skins.SparkSkin;
protected function groupLogIn_mouseOverHandler(event:MouseEvent):void
{
this.currentState = "hover";
}
protected function groupLogIn_mouseOutHandler(event:MouseEvent):void
{
this.currentState = "up"
}
]]>
</fx:Script>
<s:states>
<s:State name="up"/>
<s:State name="hover"/>
</s:states>
<s:Label id="lblUsername" color="0xffffff" fontSize="14" right="18" top="5"/>
<s:Group includeIn="hover" width="160" height="110" top="20" right="0" >
<s:Rect top="0" right="0" bottom="0" left="0">
<s:fill>
<s:SolidColor color="0x1a1a1a"/>
</s:fill>
</s:Rect>
</s:Group>
</s:Group>