help with speedy graphics
ambassador at fourthworld.com
Tue Jul 13 18:47:50 CDT 2004
Alex Tweedly wrote:
> The script (see below) uses (tries to use) templateGraphic to set the
> size and colour, but this doesn't seem to have any effect. It also uses
> lockscreen - but I see each rectangle being drawn one-by-one - I had
> expected that with lockscreen set, I would see nothing until all the
> rectangles were drawn and lockscreen was set false again.
> Script is :
> on mouseUp
> put the filename of this stack & cr into field "Field 1"
> put 0 into Kbase
> put the ticks into startTime
> put 10 into N
> set the style of templateGraphic to rectangle
> set the width of templateGraphic to 8
> set the height of templateGraphic to 6
> set the foregroundColor of templategraphic to "Firebrick3"
> set the lockScreen to true
> repeat with k1 = 1 to N
> repeat with k2 = 1 to N
> put Kbase + N*k1 + k2 into Kounter
> put "G"&Kounter into G
> create graphic G
> -- set the style of graphic G to rectangle
> set the location of graphic G to (100+10*k1,100+10*k2)
> -- set the width of graphic G to 8
> -- set the height of graphic G to 6
> -- set the foregroundColor of graphic G to "Firebrick3"
> end repeat
> end repeat
> set the lockScreen to false
> put the ticks -startTime & cr after field "Field 1"
> end mouseUp
It may be the IDE getting in the way, adjusting those properties on
newGraphic. Adding "lock messages" before the loop seems to take care
As for the lockscreen issue, I believe that's a known bug in the IDE;
you should not see that in a standalone or if the IDE is suspended.
Fourth World Media Corporation
Rev tools and more: http://www.fourthworld.com/rev
More information about the use-livecode