![](public_html/YaBBImages/1pix.gif) |
Author |
Topic: Event Handling in processing (Read 479 times) |
|
Andre_Michelle
|
Event Handling in processing
« on: Jul 29th, 2004, 2:39am » |
|
hi, i need some event handling in my game, i'm currently working on. Something like: logic.addEventListener( 'onCompleteLevel' , SoundSys ); Normally I'm working with FlashMX2004. There is an EventDispatcher to work with. Is something similar possible in processing ? I don't know how to define functions to override...
|
|
|
|
Andre_Michelle
|
Re: Event Handling in processing
« Reply #2 on: Jul 29th, 2004, 9:37am » |
|
i see, is there no solution to trigger an event by object[methodname] ? anyway, i will try this above.
|
|
|
|
arielm
|
Re: Event Handling in processing
« Reply #3 on: Jul 29th, 2004, 10:56pm » |
|
on Jul 29th, 2004, 9:37am, Andre_Michelle wrote:i see, is there no solution to trigger an event by object[methodname] |
| well, yes there's this thing called reflection in java that enables this kind of... bzzz... interruption... alegory on its way... there was that man (it's a long story) who time-traveled from the 18th century right into the middle of the nineties. i met him once, and he wanted to go to the rest-room, so i showed him the way, but then he came back and asked: "er, where is the big water bucket" "for what" i asked him... "for flushing water of course!" "ah, okay..." then i had to explain him that nowadays there's an automatic niagara system in most of the rest-rooms... bad-taste one, sorry i couldn't resist now more seriously: javascript/actionscript are providing some constructs that are very flexible on one side, but totally irrelevant in a java world. myObject["myMethodName"](myParam); is a good example: makes sense in javascript, feasible in java but still: no one feels the need to use that. first, it's terribly overkill in term of performance, and since you need "reflection" in java in order to do that (and since it's much more complicated than in javascript): if you're confident enough with java to handle reflection, then by this time you have enough wisdom anyway to know how to solve the problem without reflection!
|
Ariel Malka | www.chronotext.org
|
|
|
|