Events / signals

I’m aware of events and how to handle them. but I can’t find how to make my own event.
If I want one class to inform other of something that just happends… is there any way to make an event or send a signal?

You can.

First make a class representing your event.

class MyEvent extends

Then in your class launching the events extend and use the function dispatchEvent.

class Aclass extends {
  function myFunction () {
    dispatchEvent(new MyEvent());

This is only openfl solution, I have some core classes that I want to use in also in server (without openfl) is it possible?

Since you were asking about signals also, I want to say that ever since I’ve started using signals instead of events, this aspect of programming became so much more efficient (also in terms of runtime efficiency).
This Library also has the ability to interact with old eventDispatcher methods.

######(Sorry for the broken english)