LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Tue Feb 19, 2013 9:37 pm
Look up "angle" in the dictionary.
With a repeat loop you can make it go round and round.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Wed Feb 20, 2013 12:30 pm
Hi Ahmed,
maybe you should explain first what you mean with "a wheel effect"

Nevertheless I have the feeling that this will not be possible with the build-in means of Livecode.
Best
Klaus
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Wed Feb 20, 2013 1:06 pm
Hi Ahmed,
yes, sure
And to "rotate" an image you set its "angle" property!
What are we missing?
Best
Klaus
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Wed Feb 20, 2013 1:41 pm
Hi Ahmed,
well, maybe a "repeat" loop?
On the other hand I am sure you could simply FAKE that look like this:
Create a couple of separate images which represent the current "rotation" and then use a button's icon
to show these X images continuously instead of a FULL rotation of an image.
I will try to create a little example stack a bit later...
Best
Klaus
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Wed Feb 20, 2013 2:07 pm
Hi Ahmed,
OK, finished, check the card script, I think this is what you are looking for!
Best
Klaus
-
Attachments
-
- wheel_animation1.rev.zip
- (95.92 KiB) Downloaded 541 times
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Wed Feb 20, 2013 3:49 pm
Hi Ahmed,
glad you like it!
As you see, we are simply selling an illusion (of a rotating wheel) here
The technique of using "send X in ..." is very efficient, since it does not BLOCK like an repeat loop.
Try to get accustomed to this, very important for smooth animations!!
Best
Klaus
-
ahmedinvent24BUSGdU9
- Posts: 43
- Joined: Mon Oct 15, 2012 6:44 pm
Post
by ahmedinvent24BUSGdU9 » Fri Mar 22, 2013 4:29 pm
Thanks, Klaus
Really that is great way to make cool animation !
I use it in all apps i programmed to give it an animation!
Thanks again
Best Regards
Ahmed F.
-
William Jamieson
- VIP Livecode Opensource Backer

- Posts: 212
- Joined: Fri Feb 01, 2013 1:31 am
-
Contact:
Post
by William Jamieson » Sat Aug 10, 2013 2:54 am
Wow that really is a good way to allow constant animation while not holding up the script at all since in the wait time, the rest of the script will be processing. I am defintely going to use this!
-
tomBTG
- Livecode Opensource Backer

- Posts: 73
- Joined: Fri Nov 25, 2011 6:42 pm
Post
by tomBTG » Wed Aug 28, 2013 5:29 pm
Hi Klaus.
Would you entertain a few follow-up questions about your stack?
1) Being a newbie, I would have written a similar stack using handlers. You used "command". What's the difference? (The LC dictionary doesn't help much on this point.)
2) What is the result you are getting back from the "send" message in lin 19 and 20? I tried to view it as a variable and did not see it. You stored it in tAnimationMessage and used it to cancel the operation. Is it a message ID?
3) You end the animation_stop with "enable btn "animate" of cd 1". What is the reason for that? (Did the animation process disable the button?)
Thanks Klaus!
Tom