Skip to main content

Im trying to combine the scrollto action on a press with a conditional variable.

I want a button to scroll an image to a point and then when its there to scroll back to the start.

If I set a boolean to false then once scroll has complete set it to true i should be able to nest the scrollto action in a condition


if true scrollto 500,500

else

scrollto 0,0


set boolean = not boolean


but when i add this to a button the inital scroll works but the return doesnt

I have set an additonal graphic’s visibility linked to the variable so I know the true flase is getting switched


is there any reason why this wouldnt work?

has anyone got scrollto to work inside a conditional statement?

Be the first to reply!

Reply