Thats actually pretty easy and something that Corona SDK.
You will use a “touch” handler on a graphic that represents your button. The touch handler generates several events for each touch. The two you are interested in are the “began” event and the “ended” event. You get a began event when the touch starts and the ended event when they let up.
local function buttonHandler(event)
if event,phase == "begain" then
-- your code to start flying
elseif event.phase == "ended" then
-- your code to stop flying
end
return true -- very important to have this here
end
button = display.newImageRect("yourbuttongraphic.png",128,64) -- or whatever size your graphic is
button:addEventListener("touch",buttonHandler)
Of course you have to position your button, add it to any groups, etc. but that’s the gist of it. [import]uid: 19626 topic_id: 30700 reply_id: 123000[/import]