Actually, it's kind of the inverse of A.

When the playhead reaches the beginning of a sprite span, Director 
"instantiates" the behavior for you.  That is, it allocates enough 
memory to store a copy of the properties of the behavior (and also 
calls the beginSprite handler in the behavior).   When the playhead 
reaches the end of a sprite span, Director (calls the endSprite 
handler in the behavior), then deallocates the memory which was used 
to store that copy of the properties.

Because of the above approach, you can attach the same behavior to 
multiple sprites, and Director will allocate seperate blocks of 
memory for each sprite, while only using one copy of the code.

But to answer your direct question, when the playhead moves beyond 
the length of the sprite, the properties are no longer accessable. 
If you want to keep them, you must store them off somewhere else.

Irv


At 3:01 PM +0200 7/1/01, Enrique Nivasch wrote:
>It's me again.
>
>What happens to the properties of a behavior attached to a sprite 
>when the playback head of the movie moves to a frame that is beyond 
>the length of the sprite?
>
>Now folks let me restate my question.
>
>Suppose we have a sprite that takes up frames 1 through 5. The frame 
>has a behavior attached to it. The behavior has some properties. 
>What happens to those properties once the playback head reaches 
>frame 6?
>
>Please mark the correct answer by circling the letter of one of the 
>following statements
>
>a  The properties vanish into the black hole of the computer's memory.
>
>b  The properties are still available.
>
>c  None of the above.
>
>d  All of the above

-- 

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