At 11:28 -0500 03/31/2002, Colin Holgate wrote:

[another]

>>I can visualise the 'on prepareFrame' handler listed in the 
>>'Outdated Lingo' section of the next release of Director.
>>Either that, or the 'Utterly Pointless, Just There To Annoy You 
>>Lingo' section.
>
>You're wrong about this. Prepareframe was one of the most useful 
>improvements in Director 6.

No kidding. It's a terrific way to set the stage (as it were) before 
anything draws at all. And it's a great place to do housekeeping that 
causes other sprites to change their positions before the frame is 
drawn -- as with shooting games, for instance. If you have a "bullet" 
you can do something like this:

   on prepareFrame me
     sprite(me.spriteNum).loc = sprite(me.spriteNum).loc + 2
   END prepareFrame

...and do this with the target:

   on enterFrame me
     if intersect ( sprite(me.spriteNum).rect, sprite(bullet).rect )...
     ... bla bla bla
   END enterFrame

I believe the utility speaks for itself. You get *three* possible 
chances to update the frame status of a sprite on *every* screen 
refresh (prepareFrame, enterFrame, exitFrame) instead of just one or 
two.

-- 

              Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
        Author | Director 8.5 Shockwave Studio: A Beginner's Guide
                    Published by Osborne/McGraw-Hill
          http://www.osborne.com/indexes/beginners_guides.shtml
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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