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". see event.keyname key names.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -