Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

How to compare keypress event and an event from actor.
My problem is that i want to compare keypress up and an event named "go" from actor for throwing an event.

my code is folllows ,

help me

You can't "handle" two elements at the same time. Can you use a status node in your actor and then check to see if the status is a certain value when the key event is received?
Also, it looks like your when condition is wrong. The format of a when is "eventname[optional conditional expression]", so you probably want something like "_keypress[(@_key == _keyup) and ({/actor/actorname/status} == 'value')]".

You can't "handle" two elements at the same time. Can you use a status node in your actor and then check to see if the status is a certain value when the key event is received?
Also, it looks like your when condition is wrong. The format of a when is "eventname[optional conditional expression]", so you probably want something like "_keypress[(@_key == _keyup) and ({/actor/actorname/status} == 'value')]".

thanks....Now it is working..

thanks....Now it is working..