At 2:24 PM -0700 5/19/01, Kerry Thompson wrote:
>>if you declare "spriteNum" as a property at the top of your script, 
>>then you can just use "spriteNum" instead of "me.spriteNum"
>
>Just curious, Irv--have you run any tests to see which is faster?
>


What you want me to prived data to prove my claim?  OK, here you go:

property spriteNum

on mouseDown me
   startMS = the milliseconds
   repeat with i = 1 to 100000
     x = me.spriteNum
   end repeat
   totalMS = the milliseconds - startMS
   put "Total milliseconds using me.spriteNum:" && totalMS

   startMS = the milliseconds
   repeat with i = 1 to 100000
     x = spriteNum
   end repeat
   totalMS = the milliseconds - startMS
   put "Total milliseconds using spriteNum:" && totalMS

end


 From the message window:

-- "Total milliseconds using me.spriteNum: 353"
-- "Total milliseconds using spriteNum: 255"

Looks like I'm right.

Irv

-- 

Lingo / Director / Shockwave development for all occasions. 
          
   (Home-made Lingo cooked up fresh every day just for you.)

[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!]

Reply via email to