0
votes

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

2 Answers

2
votes

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));
0
votes

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.