lua - Callback events in Corona -
i'm trying call function in class using callback so:
//main function function main() button:setoncallback("touch", fnname) end //fnname function fnname(event) if event.phase == "ended" //do end end
the callback works if don't include event.phase == "ended" part need specify when should call function. problem is, if include part won't call entire function @ all. doing wrong here? please help. in advance.
the value of event.phase
can never "ended"
per corona api reference.
it either up
or down
.
the state of key pressed:
"up"
or"down"
. seeevent.keyname
key names.
Comments
Post a Comment