views:

55

answers:

2

Event.DISPLAYING

Why this event wont work when i try to compile the flashe (CTRL+ENTER)

Flash gives me error

1119: Access of possibly undefined property DISPLAYING through a reference with static type Class.

+2  A: 

There is no such constant.

If you want to use a custom event you will have to either subclass Event (don't forget to implement the clone-method) or you can use a constant of your own like this:

Define the constant in your class :

public static const DISPLAYING:String = "myevent_displaying";

Then use it when dispatching:

dispatchEvent(new Event(MyClass.DISPLAYING));
grapefrukt
A: 

May be you have a user defined class named Event imported in to the code. If that is the case, use the fully qualified class name flash.events.Event.DISPLAYING to force the correct class.

Amarghosh
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html#DISPLAYINGSo what about this then?I need to know if my SWF is currently activated in the TAB. Couse some enterframe evnts are not working anymore when i open a new tab in my browser.
Michiel Ponjee