Hi John,
Although the stepFrame and enterFrame events are identical in function,
what differs is the objects they are sent to. Enterframe events are sent to
sprites on the stage. Behaviors attached to these sprites can then
interecept this event and perform some action. Parent scripts, although
similar to behaviors, cannot be attached to sprites. Thus it is impossible
for them to know when one frame is over and another begins, unless you do
some nifty programming with the timer. But an easier way is to simply add
the child object to the actorList. Then in between every frame, it can
recieve a stepFrame message.

This can also be used with behaviors if you want them to last beyond the
last frame of the sprites they are attached to. Simply add the behavior to
the actorList and then you can refer to it even from other frames or even
movies. See this trick in action in the Multiuser connection behavior that
ships in the library.

I think it used to be the norm beyond the days of Director 5 when behaviors
were non existent. Am I right guys? I am not too sure coz I was still
looking for the keys on my keyboard back then. :-)

Regards,
Pranav
-----------------------------------------------------------
"Simply stated, it is sagacious to eschew obfuscation."
--Norman Augustine



<obliterated>
What is the significance of using an object
using the stepFrame handler than a behavior
using an enterFrame handler performing
relatively the same thing?
<obliterated>



[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