Показать сообщение отдельно
Старый 17.11.2009, 18:39
GentleFLASH вне форума Посмотреть профиль Отправить личное сообщение для GentleFLASH Найти все сообщения от GentleFLASH
  № 4  
Ответить с цитированием
GentleFLASH

Регистрация: Apr 2009
Сообщений: 117
Возможно стоит вначале ознакомиться со справкой по AS3? (http://help.adobe.com/en_US/AS3LCR/F...0.0/index.html)
Нужно указать тип события при вызове hasEventListener. Вроде myObject.hasEventListener( Event.ENTER_FRAME ), тогда она вернет либо true либо false.

Цитата:
hasEventListener () method
public function hasEventListener(type:String):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 9, AIR 1.0

Checks whether the EventDispatcher object has any listeners registered for a specific type of event. This allows you to determine where an EventDispatcher object has altered handling of an event type in the event flow hierarchy. To determine whether a specific event type actually triggers an event listener, use willTrigger().

The difference between hasEventListener() and willTrigger() is that hasEventListener() examines only the object to which it belongs, whereas willTrigger() examines the entire event flow for the event specified by the type parameter.

When hasEventListener() is called from a LoaderInfo object, only the listeners that the caller can access are considered.

Parameters
type:String — The type of event.

Returns
Boolean — A value of true if a listener of the specified type is registered; false otherwise.

See also
willTrigger()