[AS3] Signal 野: Signal VS DeluxeSignal

http://insideria.com/2010/10/an-introduction-to-as3-signals.html
睇左先
up 一大春英文,搞咩,超簡單
signal 係可以 pass parameter,但 pass 個個 object 就係個個 object 囉

DeluxeSignal 就勁啦,係 pass event
event signal 都識 pass 啦,咁你就錯
呢個 event 係 as3 d fd,你 pass 左,過到去,有翻曬你以前 event 玩既野
例如 event.currentTaret, event.type, event.target 咁
咁咪開心又興奮囉~

[AS3] 兩個 SWF event 傳黎傳去既方法

你仲想利用個 event 傳data ?

[actionscript3]
mother.addEventListener(CustomEvent.MODULE_CLOSE, onModuleClose)

function onModuleClose(e:*):void {

var data = e.data;

}

var data = {a:1, b:"hello"};

swf.dispatchEvent(new CustomEvent(CustomEvent.MODULE_CLOSE, data));

[/actionscript3]

PS

如果要玩 bubbling: 記得 extend 個陣 要 override 埋 clone 呢個 function!

[AS3] Hit on hitTestObject

hitTestObject is always use

but do u know:

mc.hitTestObject(target)

if target.visible = false and target.alpha =0

其實都 hit 中 return true

小心d 啦~ 最好加多個 condition

mc.hitTestObject(target) && target.visible