At 04:43 -0800 03/14/2002, nitin sharma wrote:
>hi Howdy-Tzi
>thanks for script.
>but i have one question, can't we get those cast
>member which we create
>by duplicatecastmember script or new() cast member
>script.
>
>spose
>
>i have one button for creating new cast member
>
>on mouseup
>new(#box or what ever)
>end
>
>this create a new cast member in cast lib.
>i want, that cast member should be come to stage & we
>can also edit that
>cast member property when we want,
>like i have second button for change color or make
>changes of that member.(new sprite)
Well, you can also add those functions to the behavior that you
attach with the scriptInstanceList, or you can attach multiple
behaviors in the scriptInstanceList. That way you can add whatever
behaviors you want to add to the sprite as you go.
Heck if you wanted to you could even randomize, so the behaviors
attached would not necessarily be the same for sprites you add to the
stage and the user would have to click to discover what was there.
Sort of like a game. One square changes color; another becomes
translucent; a third "squirts" out from under the mouse.
But as far as setting color, movability and so on when creating a
sprite using puppetSprite, yeah, you can do all that at one go:
on mouseUp me
puppetSprite ( whatever, TRUE )
sprite(whatever).member = whatever
sprite(whatever).moveable = TRUE
sprite(whatever).foreColor = someColor
END mouseUp
Any sprite variables you can set with something that already exists
on the stage (ink, blend, editable, scale, rotate, loc, rect, etc.)
can also be set on a sprite you create on the fly with puppeting.
--
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!]