首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

Flex Accordion领航收缩

2012-10-31 
Flex Accordion导航收缩package components.common{import flash.events.MouseEventimport mx.containers

Flex Accordion导航收缩
package components.common
{
import flash.events.MouseEvent;

import mx.containers.Accordion;
import mx.containers.accordionClasses.AccordionHeader;

public class MyAccordionHeader extends AccordionHeader
{
public function MyAccordionHeader()
{
super();
this.addEventListener(MouseEvent.CLICK,func);
}
private function func(e:MouseEvent):void{
(this.parent as Accordion).selectedIndex = (this.parent as Accordion).getChildren().length -1;
}

}
}
在<Accordion></Accordion>中添加headerRenderer="components.common.MyAccordionHeader"即可实现Accordion导航收缩功能。

热点排行