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

四、Flex3自定义事件、事件冒泡及传值、组件间的函数回调及传值

2012-09-02 
4、Flex3自定义事件、事件冒泡及传值、组件间的函数回调及传值为了演示事件冒泡,demo写的可能有点繁琐。大家凑

4、Flex3自定义事件、事件冒泡及传值、组件间的函数回调及传值

为了演示事件冒泡,demo写的可能有点繁琐。大家凑合看看。

1.project结构

?

四、Flex3自定义事件、事件冒泡及传值、组件间的函数回调及传值

2、主文件

?3、WorkSpace.as

?4、弹出窗口SongList.mxml

?5、自定义事件、这里的属性最好写成private类型,再加上set、get方法。我这里写的是public 的

package com.future.event{import flash.events.Event;public class SelectSongEvent extends Event{public static const SELECT_SONG:String = "select song";public var selectedSong:String;public function SelectSongEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){super(type, bubbles, cancelable);}}}
?

热点排行