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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -