Asynchronous animations in LCB
david at viral.academy
Tue May 10 12:26:54 CEST 2016
Thanks Mark - I think as an excercise adding an alarm capability to the
clock seems like a nice thing to do. Looking in to how do you dispatch
messages from LCB to LivecodeScript? I see two option "send" and "post"
wandering what the difference is...
I also have a general question about the scope and robustness at this stage
of compound widgets. As an example if I am looking to dynamically move
clickable sprites around can I do things like add a number svg icon widgets
and animate them?
It would be good to have an idea about the speed of using widgets to do
complex layouts and interactions like this - as compared with doing the
same using groups and Livecode script - in what areas would I expect to see
a speedup, and what areas would be about the same or slower for now?
On 10 May 2016 at 10:19, Mark Waddingham <mark at livecode.com> wrote:
> On 2016-05-10 10:56, David Bovill wrote:
>> I'm contemplating doing some animations in a widget, and would like the
>> animation to be non-blocking. How do you achieve that in LCB?
> At the moment a widget can ask for a single shot callback 'timer' using:
> schedule timer in <seconds> seconds
> A timer can be cancelled by using
> cancel timer
> When a timer triggers the OnTimer handler of the widget is invoked.
> This is sufficient to do simple animations, indeed the clock shows a good
> example of using it:
> Hope this helps!
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode