Hi! I have an object that I want to begin rotating with the press of a button and not stop until another button is pressed. Below is what I have so far. It just does a quick rotation then stops.
local turnon = function (event )
if event.phase == “release” then
blades.rotation = blades.rotation + 32
end
end
local onbutton = widget.newButton{
default = “buttonoff.png”,
defaultX = 370,
defaultY = 66,
onRelease = turnon
}
onbutton.x = display.contentHeight / 3
onbutton.y = display.contentWidth / .716 --397
Also, how do you put the code in a little “window” thing? Thanks [import]uid: 39302 topic_id: 23436 reply_id: 323436[/import]