Axel,
Looks like you launched lots of animate cycles. And you needed only one.
Shoes.app do
x=0
y=20
destination = 100
speed = 5
@o=oval(x,y,5)
animate(24) do
x+=speed unless x==destination
@o.move(x,y)
end
end
simple-anim-shapes.rb in samples folder is a guide.
_why,
I did not manage to find in manual description of .move method and a way to
change styles of graphic elements already drawn. Any hint on the latter?
Regards,
Pavel Sokolov
On Thu, Jun 12, 2008 at 12:04 AM, Axel Etzold <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am having problems with "animate", for some time now ...
> I want to draw an animation of a circle that moves from a point A to B.
> Trying to follow the example "follow.rb", I managed to draw start point,
> end point,
> and many circles in between, but they all appear at once (so there's no
> impression
> of movement). Now, out of several hundred in-between positions, I tried to
> choose
> 20 consecutive, and let Shoes draw them, and push the index further, draw
> the next 20 consecutive.
> But I don't get anything: if I remove the clear -do line below, and keep
> animate, the application
> crashes (A "Shoes doesn't work anymore"-window appears, on windows vista
> pro, shoes r646), if I put the
> clear-do line in, I don't see anything at all...)
> The app.draw command alone works.
>
> .....
> i=0
> size=10
> while i+20<all_circles.length
> t20=all_circles[i...i+20]
> & nbsp; t20.each{|t|
> app.animate(12) do
> clear do
> app.draw(t[0],t[1],size)
> end
> end
> }
> i=i+1
> end
>
>
> What's going wrong ?
>
> Thank you for your help,
>
> Best regards,
>
> Axel
> < /span>
>