<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:states>
<mx:State name="index1">
<mx:AddChild position="lastChild">
<mx:VBox id="myvbox1" x="{mymenubar.x}" y="{mymenubar.x + mymenubar.height}" width="{mymenubar.width}" height="248" backgroundAlpha="0.5" backgroundColor="#FFFFFF">
</mx:VBox>
</mx:AddChild>
</mx:State>
<mx:State name="index2">
<mx:AddChild position="lastChild">
<mx:VBox id="myvbox2" x="{mymenubar.x}" y="{mymenubar.x + mymenubar.height}" width="{mymenubar.width}" height="248" backgroundAlpha="0.5" backgroundColor="#F5E31">
</mx:VBox>
</mx:AddChild>
</mx:State>
<mx:State name="index3">
<mx:AddChild position="lastChild">
<mx:VBox id="myvbox3" x="{mymenubar.x}" y="{mymenubar.x + mymenubar.height}" width="{mymenubar.width}" height="248" backgroundAlpha="0.5" backgroundColor="#8DF531">
</mx:VBox>
</mx:AddChild>
</mx:State>
<mx:State name="index4">
<mx:AddChild position="lastChild">
<mx:VBox id="myvbox4" x="{mymenubar.x}" y="{mymenubar.x + mymenubar.height}" width="{mymenubar.width}" height="248" backgroundAlpha="0.5" backgroundColor="#31F5E5">
</mx:VBox>
</mx:AddChild>
</mx:State>
<mx:State name="index5">
<mx:AddChild position="lastChild">
<mx:VBox id="myvbox5" x="{mymenubar.x}" y="{mymenubar.x + mymenubar.height}" width="{mymenubar.width}" height="248" backgroundAlpha="0.5" backgroundColor="#D731F5">
</mx:VBox>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:XMLList xmlns="" id="menulist">
<menuitem id="menu1">
<menuitem id="submenu1" type="radio" groupname="one">
</menuitem>
<menuitem id="submenu2" type="radio" groupname="one">
</menuitem>
</menuitem>
<menuitem id="menu2">
</menuitem>
<menuitem id="menu3">
</menuitem>
<menuitem id="menu4">
<menuitem id="submenu3" type="radio" groupname="two">
</menuitem>
<menuitem id="submenu4" type="radio" groupname="two" selected="true" >
</menuitem>
<menuitem id="submenu5" type="radio" groupname="two">
</menuitem>
</menuitem>
</mx:XMLList>
<mx:Script>
<![CDATA[
import mx.events.MenuEvent;
private function menuClickHandle(e:MenuEvent):void{
if(e.label == "submenu1"){
currentState = "index1";
}else if(e.label == "submenu2"){
currentState = "index2";
}else if(e.label == "submenu3"){
currentState = "index3";
}else if(e.label == "submenu4"){
currentState = "index4";
}else if(e.label == "submenu5"){
currentState = "index5";
}
}
]]>
</mx:Script>
<mx:MenuBar dataProvider="{menulist}" id="mymenubar" labelField="@id" showRoot="false" width="293" horizontalCenter="0" y="24" change="menuClickHandle(event);">
</mx:MenuBar>
<mx:transitions>
<mx:Transition id="myTransition1" fromState="*" toState="index1">
<mx:Parallel target="{myvbox1}">
<mx:WipeUp duration="2000"/>
<mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="2000"/>
</mx:Parallel>
</mx:Transition>
<mx:Transition id="myTransition2" fromState="*" toState="index2">
<mx:Parallel target="{myvbox2}">
<mx:WipeDown duration="2000"/>
<mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="2000"/>
</mx:Parallel>
</mx:Transition>
<mx:Transition id="myTransition3" fromState="*" toState="index3">
<mx:Parallel target="{myvbox3}">
<mx:WipeRight duration="2000"/>
<mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="2000"/>
</mx:Parallel>
</mx:Transition>
<mx:Transition id="myTransition5" fromState="*" toState="index5">
<mx:Parallel target="{myvbox5}">
<mx:WipeLeft duration="2000"/>
<mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="2000"/>
</mx:Parallel>
</mx:Transition>
<mx:Transition id="myTransition4" fromState="*" toState="index4">
<mx:Parallel target="{myvbox4}">
<mx:Blur blurXFrom="0" blurXTo="100" duration="2000"/>
<mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="2000"/>
</mx:Parallel>
</mx:Transition>
</mx:transitions>
</mx:WindowedApplication>
分享到:
相关推荐
flex常用的几种动态菜单
FLEX 鱼眼菜单,点击菜单3D旋转效果切换页面
Flex自定义右键菜单
超cool 的flex 菜单,flash builder 4
Flex4的菜单滑动效果,可以参考一下,move特效的使用方法
flex 自定义右键菜单 多级右键菜单flex 自定义右键菜单 多级右键菜单flex 自定义右键菜单 多级右键菜单
flex 鱼眼菜单flex 鱼眼菜单flex 鱼眼菜单flex 鱼眼菜单
NULL 博文链接:https://tongqiuyan.iteye.com/blog/1207523
Flex屏蔽浏览器系统右键,实现自定义Menu的右键菜单,支持XML格式的多级菜单,以及支持菜单出现位置的自适应。欢迎大家修改,(能给出如何恢复浏览器右键菜单最好)。
Flex 菜单导航特效 工程源码 不错哦
Flex右键菜单 flex tree 右键菜单 导入eclipse可直接用。我使用的flex sdk 版本是flex4.5.1,更改为4.0可直接使用。
在xml中配置好一级菜单的图片路径,二三级菜单名称,即可生成多级系统菜单
Flex添加右键菜单,只是文档,里边有描述性的代码
用flex开发的一个超酷3D菜单,可以跟随鼠标移动,流畅
flex添加右键菜单实例。很经典的实例。
NULL 博文链接:https://mirabelle1211.iteye.com/blog/961255
Flex实现的走马灯菜单,感觉很爽,可循环,菜单,菜单,菜单;循环,循环,循环。
flex 右键菜单两种实现: 1.系统右键菜单,系统右键菜单项中添加菜单项 2.屏蔽系统右键菜单,自定义右键菜单
FLEX 3DMENU 3D菜单 特效 特效 3D菜单 3DMENU FLEX