-- at first i set the properties in every behavior:
property canvasSprite
property surfaceSprite
property vectorSprite
property crossSprite
property ballSprite
on beginSprite me
canvasSprite = sprite( 2)
surfaceSprite = sprite( 7)
vectorSprite = sprite(10)
crossSprite = sprite(12)
ballSprite = sprite(14)
end beginSprite me
--------------
-- then i put them in the movie script:
global canvasSprite
global surfaceSprite
global vectorSprite
global crossSprite
global ballSprite
on PrepareMovie
canvasSprite = sprite( 2)
surfaceSprite = sprite( 7)
vectorSprite = sprite(10)
crossSprite = sprite(12)
ballSprite = sprite(14)
end PrepareMovie
on stopMovie
clearGlobals
end stopMovie
which way is faster? or is there no difference? i changed a lot of
things in the scripts,
so it could be something else that slows down the movie.
Thanks for your reply, Julius.
>Date: Fri, 01 Jun 2001 10:20:33 -0400
>From: Tab Julius <[EMAIL PROTECTED]>
>Subject: Re: <lingo-l> globals vs properties
>Globals vs. properties just really refers to which memory space you
have
>them in. There is some overhead that is incurred when starting a
handler
>with globals in that script, but not that you'd probably notice unless
you
>had hundreds or thousands. Otherwise, there is no "speed" factor per
se...
>How are you using them and what makes you think they're slow? How
you're
>using them might make a difference.
>At 04:11 PM 6/1/01 +0200, schmidt-r wrote:
>>i have several behaviors which use the same properties.
>>these properties do not change. so i could make globals
>>out of them. when i do, i get the impression that the
>>speed slows down.
>>
>>are globals really slower than properties?
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]