Equivalent to hasEventListener for NativeSignal?

18 views
Skip to first unread message

eco_bach

unread,
Nov 28, 2010, 11:01:44 PM11/28/10
to as3-signals
Hi
Currently in the process of converting a as3 project over to using
signals. Can someone help me with converting 'hasEventListener'?

//CODE START
downSignal=new
NativeSignal(this,MouseEvent.MOUSE_DOWN,MouseEvent);

if (this.hasEventListener(MouseEvent.MOUSE_DOWN) == false)

//would this be equivalent to?
if (downSignal.hasOwnProperty(MouseEvent.MOUSE_DOWN) == false)

Ben Kanizay

unread,
Nov 29, 2010, 4:06:45 AM11/29/10
to as3-s...@googlegroups.com
You could use the numListeners property. Ie

if (downSignal.numListeners > 0) ...

Ben

Reply all
Reply to author
Forward
0 new messages