Tom Hines wrote:
> What I'm getting at is what is the purpose of the 'on prepareFrame' handler when the
>'on beginSprite' handler can be used in a frame script?
> Is the 'on beginSprite' handler meant to be used in a frame script? Or an 'on
>prepareFrame' handler to be used in a sprite script for that matter?
>
Hey Tom,
You right that on beginsprite only fires once. When the sprite is first born onto the
stage. This is a good place to run code to initialize the sprite. On beginsprite can
be used with either frame scripts or on actual sprites.Same with the on prepareFrame,
or on enter/exitFrame for
that matter. They aren't limited to being placed only in frame scripts. If you have a
ball sitting on the stage and you want it to animate then drop a behaviour on it that
uses on prepareFrame to execute the animation.
on prepareFrame me
sprite(me.spriteNum).locH=sprite(me.spriteNum).locH+1
end
And again you can use a flag to turn the animation on and off. Have you experimented
much with behaviours? Understand what properties are? If not read up on them, very
powerful stuff.
HTH
Rob
[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!]