2

is it possible to create simple custom events in Processing similar to as3?

dispatch(new Event("HEY"));
myObject.addEventListener("HEY",callBack);
RenniePet
  • 11,420
  • 7
  • 80
  • 106
  • 2
    You have to use `Observer` and `Observable`. See this [thread on the Processing forum](http://forum.processing.org/topic/custom-events-event-listener). – bfavaretto Jul 02 '12 at 21:39
  • Is this Java-related? If so, you should tag your question as such. – RenniePet Jan 04 '15 at 12:32

1 Answers1

0

No, you need to implement the observer-pattern yourself. Here is a small example on how to do so in Java: Stackoverflow: Create a custom event in Java

Community
  • 1
  • 1
Pwdr
  • 3,712
  • 4
  • 28
  • 38