flex4实现类似鱼眼的按钮,非常简单,示例代码如下。
<fx:Declarations>
<mx:Parallel id="rolloverEff">
<mx:Resize widthTo="48" heightTo="48" duration="400"/>
</mx:Parallel>
<mx:Parallel id="rolloutEff">
<mx:Resize widthTo="38" heightTo="38" duration="600"/>
</mx:Parallel>
</fx:Declarations>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/main.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" />
<mx:Label text="XXX" />
</s:VGroup>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/anjianguanli.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" click="toSubSystemMainConsole('caseHandling/CaseHandlingMainConsole.swf','','','caseHandling')"/>
<mx:Label text="XXX" />
</s:VGroup>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/yewuguanli1.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" click="toSubSystemMainConsole('businessHandling/BusinessHandlingMainConsole.swf','','','businessHandling')"/>
<mx:Label text="XXX" />
</s:VGroup>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/approval.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" toolTip="XXX" click="toSubSystemMainConsole('administrativeApproval/AdministrativeApprovalMainConsole.swf','','','administrativeApproval')"/>
<mx:Label text="XXX" />
</s:VGroup>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/zhihuidiaodu.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" />
<mx:Label text="XXX" />
</s:VGroup>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/zonghepingjia.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" click="toSubSystemMainConsole('comprehensiveEvaluation/ComprehensiveEvaluationMainConsole.swf','','','comprehensiveEvaluation')" />
<mx:Label text="XXX" />
</s:VGroup>
<s:VGroup horizontalAlign="center">
<mx:Image width="38" height="38" source="@Embed('images/menu/oa.png')" rollOverEffect="{rolloverEff}"
rollOutEffect="{rolloutEff}" click="toSubSystemMainConsole('administrativeApproval/AdministrativeApprovalMainConsole.swf','','','administrativeApproval')"/>
<mx:Label text="XXX" />
</s:VGroup>