flex 实现横向树状图
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initApp()"
backgroundColor="#FFFFFF">
<mx:Canvas id="paper"
x="30"
y="24"
width="1200"
height="1800">
<mx:Canvas id="LEV"
name="LEV"
x="20"
y="17"
width="120"
height="120"
borderStyle="inset">
<mx:Button x="0"
y="74"
label="关键词导出"
width="116"
height="20"
color="#1B803A"/>
<mx:Text x="0"
y="20"
width="116"
height="55"
text="List PV:10000"
fontSize="12"
color="#C71B2B"/>
<mx:Image id="LEV_pic"
name="LEV_pic"
x="94"
y="44"
width="22"
height="22"
click="expandRootTree(event)">
<mx:source>{IMAGE_OPEN_SOURCE}</mx:source>
</mx:Image>
<mx:Button x="0"
y="94"
label="Button"
width="116"
height="20"
color="#128D1E"/>
<mx:Label x="0"
y="0"
text="Label"
width="116"
fontSize="14"
fontWeight="bold"
color="#362DF7"/>
</mx:Canvas>
</mx:Canvas>
<mx:Script>
<!--[CDATA[
import mx.controls.Label;
import mx.controls.Text;
import mx.controls.Button;
import mx.containers.Canvas;
impor
相关文档:
<img src="{{----}}13730" mce_src="{{----}}13730"/><span id="__caret">_</span><?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationCo ......
package
{
import mx.containers.Panel;
import mx.controls.Button;
import flash.events.Event;
import mx.events.FlexEvent;
import flash.events.MouseEvent;
import mx.controls.Alert;
/**
* This class is used to create a Custom Panel
* with Maximum, Minimum, close
* and also drag p ......
/*============使用==========*/
var contextmenu:ContextMenuManager=new ContextMenuManager();
contextmenu.add("最大化",menuHandle);//menuHandle处理函数
/**==================ContextMenuManager.as==========================*/
package file
{
import flash.display.Interact ......
注意:本机必须连接互联网
效果图:
源码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" creationComplete="init()">
<mx:Panel width="620" height="455" layout="absolute" title="天气预报" fontSize="12">
......
Ctrl-F11: 执行(Run)
F11: 除错(Debug)
Ctrl-Alt-Down: 重复目前所在编辑列(Repeat current line )
Alt-Up: 移动本列,或选择列往上移动(Move line (or selection) up )
Alt-Down: 移动本列,或选择列下往移动(Move line (or selection) down )
Ctrl-Click: 移至定义区(Go to definition (also F3) ) ......