Hi,
I'm not a professional scripter, I'm more of a content-producer and
designer, but I do a lot of simple scripting. Below is the first script I
wrote in MetaCard. I was very proud of it -- until it begin to make my
buttons seep slowly down the page. The idea is to make a button react when
you click on it. My project is so huge, there are so many different kind of
clickable things that this was a good universal reaction that they all
could share.
The script works perfectly almost all the time. At first I would just
notice that buttons would be re-positioned down and to the right. But would
not be able to reproduce the problem while I was clicking on them and
looking at them. Now I have noted that on a button on a palette that sends
a message to a handler on its main stack script, all I have to do is
machine gun click the buttons as rapidly as I can and they will immediately
begin to slide down the page. Anyone have any ideas how I can bullet-proof
this simple script? Or replace it with a better one? I would prefer not to
have to buttons, in different positions, and set the visible to true and
false, as this would entail a great deal of work.
Button script
on mouseDown
downThumbnail
upThumbnail
end mouseDown
on mouseUp
set cursor to watch
go next cd
end mouseUp
Stack script
on downThumbnail
move the target relative 2, 2 in 90 millisecs
move the target relative -2, -2 in 90 millisecs
end downThumbnail
on upThumbnail # left this empty handler in all buttons in case it would
be useful in fix
end upThumbnail
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm