Page 2 of 2

Re: Stop-Start: animation along a path

Posted: Mon Jul 04, 2016 4:26 pm
by MaxV
Well, you can use the same code also with the points of any graphic. It works better and smoother, because it uses the send loop. Look here:

########CODE#######
on mouseUp
if the label of me is "GO" then
set the label of me to "STOP"
else
set the label of me to "GO"
end if
moveSun
end mouseUp

on moveSun
if the label of me is "STOP" then
put the points of graphic 1 into mypoints
put the angolo of me into temp
if temp is empty then put 1 into temp #this is useful for the first launch
put line temp of mypoints into newloc
set the loc of button "Sun" to newLoc
add 1 to temp
if temp > the number of lines of mypoints then
put empty into temp
end if
set the angolo of me to temp
send "movesun" to me in 0.01 sec
end if
end moveSun
#####END OF CODE#####

Moreover you can also edit the graphic during sun movement!!!

Re: Stop-Start: animation along a path

Posted: Mon Jul 04, 2016 5:09 pm
by MaxV

Re: Stop-Start: animation along a path

Posted: Mon Jul 04, 2016 5:10 pm
by richmond62
Very elegant; instead of using a listField you use a variable; quicker
but not quite so easy for learners to visualise.

Lovely video!

Re: Stop-Start: animation along a path

Posted: Sat Sep 24, 2016 5:30 am
by capellan
Hi All,

I found a tutorial about this topic in MaxV website:
http://livecodeitalia.blogspot.it/2016/ ... reale.html
and just made a variation that shows a pen drawing vector paths.

Download attached stack: "MaxV Interactive Drawing path.livecode.zip" and play with it.
Every idea to improve usefulness and performance of this stack is welcome.

Alejandro
A0010.jpg
MaxV Interactive Drawing path.livecode.zip

Re: Stop-Start: animation along a path

Posted: Sat Sep 24, 2016 11:43 pm
by capellan
This is version 02 of previous stack.

With more additional tools and scripts, this stack could be
actually useful to create animations that looks like those
youtube videos where a hand is drawing over a whiteboard.
A0011.jpg
MaxV Interactive Drawing path 02.livecode.zip