Stopping a script

Dar Scott dsc at swcp.com
Tue Jun 28 14:59:49 EDT 2016


Maybe this is a good time to introduce the event style of programming.  

Focus on 'move...without waiting', and 'moveStopped' and maybe 'send'.  

Well, if the details allow that.  If using moveStopped makes things jerky, then you might need to do something else.  However, I think my grandson made a walking stick figure doing this.  

When you stop, not only stop moving but also set a flag so moveStopped does not start the next motion.  


> On Jun 28, 2016, at 12:32 PM, Richmond <richmondmathewson at gmail.com> wrote:
> 
> I have a *button* which, when I click on it, sends a *graphic object* off on a mad journey all over
> a *card* based on reading positions from a*listField*.
> 
> I have tried *STOP MOVING* to interrupt that script, but that does *NOT* work
> because the graphic is executing a large number of very short movements in a cycling
> *REPEAT UNTIL* structure.
> 
> Ideally (Ho, Ho, Ho.) I should like to be able to have something like this:
> 
> the mad movement script starts executing when triggered by a *mouseEnter* script
> in the *graphic object* that moves,
> 
> and
> 
> some sort of *STOP SCRIPT* in a *mouseLeave* script in the same *graphic object*.
> 
> Now, I know that sounds a bit *bonkers*, but I am writing this on behalf of a very bright chap
> who is attending my Summer classes, and I do understand what he is trying to achieve.
> 
> Richmond.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list