Hi Sean,
Thanx a lot for the code snippet that u sent me...Now
i seem to understand how the thing works and try
similar approach for other predefined behaviours as
well..
Thanx
Richie
--- Sean Wilson <[EMAIL PROTECTED]> wrote:
> >
> First up, you'll have to add an "on new me" handler
> to the script you want
> to add. Inside this handler you'll need to
> initialize all the properties
> that the script object needs to operate, including
> the props that get
> configured by the GPDL handler. In the case of the
> library behavior you
> mention, these would be:
> pSprite, pStageBounds, pCentered and pLimited.
>
> This handler might look like:
>
> on new me, sNum, centered, limited
> pSprite = sNum
> pStageBounds = point(the stage.rect.width, the
> stage.rect.height)
> pCentered = centered
> pLimited = limited
> return me
> end new
>
> and you might instantiate and attach it like:
> x = script("SpriteTrackMouse").new(2, TRUE, TRUE)
> sprite(2).scriptInstanceList.add(x)
>
> You will have to be careful about when you do this -
> there MUST be a
> sprite(2) on the stage at the time, AND see below.
>
> Secondly, AFAIK, you can only dynamically add to a
> sprite's
> scriptInstanceList if there is already at least one
> behavior on the sprite.
>
> HTH,
> -Sean.
>
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
[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!]