Repeating/Looping "transition.to" on "display.newImage's"

–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)

It’s hard to even decipher if this is a question or not!

But I can tell you the transitions won’t work because:

A: you don’t specify the time for the transition

B: you only give a value “h/2” but you don’t specify what property needs to transition to this value. Do you want to change the x position, y position, scale, alpha??

It would work better like this:

transition.to(S, {time = 1000, y = h/2})

p.s. Your “if 1 == 1” condition will always be true! But you probably know that, right?

It’s hard to even decipher if this is a question or not!

But I can tell you the transitions won’t work because:

A: you don’t specify the time for the transition

B: you only give a value “h/2” but you don’t specify what property needs to transition to this value. Do you want to change the x position, y position, scale, alpha??

It would work better like this:

transition.to(S, {time = 1000, y = h/2})

p.s. Your “if 1 == 1” condition will always be true! But you probably know that, right?