–declaring variable h, adding and positioning images, and a button
w = display.contentWidth
h = display.contentHeight
B = display.newImage(“B.png”)
B.x = w*.1
B.y = h*.2
S = display.newImage(“S.png”)
S.x = w*.4
S.y = h*.2
R = display.newImage(“R.png”)
R.x = w*.8
R.y = h*.2
btn = display.newCircle(w/2, h*.9, w/10, h/2)
btn:setFillColor(0,1,0)
–trying to continually make 3 images S,R and B move down the screen, if a button is clicked
function fall(event)
if 1==1 then
transition.to(S,{h/2})
transition.to(R,{h/2})
transition.to(B,{h/2})
end
end
btn:addEventListener(“tap”,fall)