It looks like your main assumption is correct - holding y1 constant rather than varying it along with x1 should produce horizontal motion in the Simple Animation example. If it works on the first trial it's not a complete failure but may have something to do with changes in values from one trial to the next.
My guess is that there's something amiss with your treatment of y1 outside of the assignment to a constant value. Perhaps the exit condition is never met: as in the code below, y1 will never reach 30 if you get rid of (y1 = y1 - 1). So it will run fine, until x1 reaches the edge of the screen in which case it will either crash (display of negative values for x may break it) or hang (because it is no longer drawing anything visible). If this is the case, changing the exit condition so it's based on the value of x1 should sort things out.
another possibility is the assignment of values to y1. Check to make sure that indeed y1 is assigned the value you want, and that this value persists across trials. The simplest way to test this out is to set the value of y1 immediately before the loop (although this is not good programming practice, it's a clear way to be sure that y1 has the desired value).
In cases like these I find it's useful to employ the debug.print function as part of the inline code - for example here displaying the value of x1,y1 to the output window while the experiment is running.
hope this helps!
david
________________________________________
From: e-p...@googlegroups.com [e-p...@googlegroups.com] on behalf of BeckyL [lundwal...@gmail.com]
Sent: 27 January 2012 18:59
To: E-Prime
Subject: creating an oscillating bar using an inline element
ORIGINAL CODE
Loop
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.