Skip to main content
Question

cant combine scrollto and variables/conditionals


Dylan_Davis

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?

This topic has been closed for comments

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings