I'm trying to make the image (Button) flip based on a variable, but I can't get it to work.
Using a global named direction, defaults to "left"
In a key function for moving, I added this:
Code: Select all
if x is "right" then
set the right of the button "box" to the right of the button "box" +10
if direction <> "right" then
flip image "dragon.jpg" horizontal
end if
put "right" into direction
end if
What could I be doing wrong?