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!!!
Stop-Start: animation along a path
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Stop-Start: animation along a path
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Stop-Start: animation along a path
Look here: https://youtu.be/IFKb3CzWznI 

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- Livecode Opensource Backer
- Posts: 10090
- Joined: Fri Feb 19, 2010 10:17 am
Re: Stop-Start: animation along a path
Very elegant; instead of using a listField you use a variable; quicker
but not quite so easy for learners to visualise.
Lovely video!
but not quite so easy for learners to visualise.
Lovely video!
Re: Stop-Start: animation along a path
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
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
Re: Stop-Start: animation along a path
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.
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.