Shrink/enlarge image based on given response
I'm programming an approach-avoid task using inline scripts in opensesame.
Participants have to sort portrait and landscape images by moving the mouse to the top or bottom of the screen.
For mousetracking I'm using mousetrap. I programmed it so that two invisible boxes are on the top and bottom of the screen. And in the middle of the screen the stimulus image is presented.
When someone moves the cursor to the top box (avoid) I want to shrink the picture, and when someone moves the cursor to the bottom box (approach) I want to enlarge the picture.
I can't seem to figure out a way to do this.
As of now the inline script (run phase), after the mousetrap item, looks like this:
response_canvas = canvas() if var.response_mousetrap_response == "top_box": response_canvas.text("Image is supposed to get smaller now") elif var.response_mousetrap_response == "bottom_box": response_canvas.text("Image is supposed to get larger now") response_canvas.show()
Does anyone know of a way to do this?