Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Let images move

Hi all,

I am working on an experiment and the idea is that the participants will see three pictures in a row (horizontal): In some trials the first picture has to move upwards and the second and third picture downwards. In other trials the first and second picture have to move upwards and only the third picture downwards (difference in speed will be great too). Or even more complicated, the first pictures jumps over the second and third picture and the second and third picture have to move a little to the left. I was wondering whether this is even possible by just using a script for example, and if so, how to do this?

If not, suggestions are more than welcome! I have thought about making short movies with powerpoint and upload these, but because we will have between 210 and 300 items I am afraid we will get memory issues.

Many thanks!


  • HI Felicity,

    The easiest way to solve this is by using OpenSesame 3.2, which is currently in prerelease but will be released as stable soon:

    This new version allows you to assign names to elements from a sketchpad. So say that you have a sketchpad called my_sketchpad with three pictures named 'pic1', 'pic2', and 'pic3'.

    You can then insert a simple inline_script immediately after my_sketchpad that gets the canvas of the sketchpad, and then changes the position of the elements in a for loop, so as to create an animation. Do you see the general idea? The script below will move 'pic1' and 'pic3' downward, and 'pic2' upward, but you can create all kinds of complicated animations this way.

    my_canvas = items['my_sketchpad'].canvas
    for frame in range(100):
        my_canvas['pic1'].y += 1
        my_canvas['pic2'].y -= 1
        my_canvas['pic3'].y += 1


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

Sign In or Register to comment.