flex 右键菜单管理工具类
/*============使用==========*/
var contextmenu:ContextMenuManager=new ContextMenuManager();
contextmenu.add("最大化",menuHandle);//menuHandle处理函数
/**==================ContextMenuManager.as==========================*/
package file
{
import flash.display.InteractiveObject;
import flash.events.*;
import flash.errors.IllegalOperationError;
import flash.ui.*;
import flash.utils.getQualifiedClassName;
public class ContextMenuManager extends EventDispatcher
{
protected var menu:ContextMenu;
protected var target:InteractiveObject;
public function ContextMenuManager(target:InteractiveObject,hideBuiltInItems:Boolean=true)
{
this.target=target;
menu=new ContextMenu();
if(hideBuiltInItems)
{
menu.hideBuiltInItems();
}
this.target.contextMenu=menu;
menu.addEventListener(ContextMenuEvent.MENU_SELECT,passEvent);
}
public function add(caption:String,handler:Function,separatorBefore:Boolean=false,enabled:Boolean=true,visible:Boolean=true):ContextMenuItem
{
var result:ContextMenuItem=createItem(caption,handler,separatorBefore,ena
相关文档:
更多 Flex 4 示例,请到 http://www.slsay.com
现有成熟常用的Flex框架:
Cairngorm (Adobe Open Source) - MVC framework
PureMVC (Open Source) - MVC framework
Mate (Open Source) - tag-based, event-driven
Swiz (Open Source) - Metadata-based Dependency Injection ......
HScrollBar {
downArrowUpSkin:
Embed(source=”/assets/downArrow.png”);
downArrowOverSkin:
Embed(source=”/assets/downArrow.png”);
downArrowDownSkin:
Embed(source=”/assets/downArrow.png”);
upArrowUpSkin:
Embed(source=”/assets/upArrow.png”);
upArro ......
使用js来操作flex
首先在fademo.mxml中声明一个button,并添加一个btnClick方法:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="l ......
相关下载
Flex正式版EXE下载地址:
http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ.exe
Flex正式版插件下载地址:
http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
LCDS
官方下载(需要先注册)
https://www.adobe.com/cfusion/tdrc/index.cfm?p ......
--------------ex3_01_solution -----------------------Using text controls
在嵌套的EmployeeOfTheMonth中
<s:Scroller width="100%">
<!-- Use a RichEditableText control -->
&nbs ......