I want to create a lot of text
fields to display information on the stage and dont want to
do it by hand. So i thought to create a script to generate
child objects and display them on the screen. I can easily
cretae a new field in the cast, but how can i assign that new
cast member to a sprite using lingo?

Sprite(x).member = "someTextMember"


You used to have to do a puppetSprite, but since Director 7, I believe,
you implicitly puppet a sprite by manipulating it.

Before you do this, though, I would strongly recommend that you create a
range of dummy sprites. I just use a 1-pixel bitmap and place it
offstage. When it comes time to use it, I put it onstage with
sprite(x).locH and locV.


You do want the dummy sprites, though. Don't create sprites from thin
air. That's an unsupported feature, and while it will work most of the
time, there are some hidden gotchas that could bit you.

I used to want to create sprites out of air as well, but I now go with a score full of holder sprites - sprites that are zero-pixel bitmap instances (and the credit goes to Irv). It's simple and effective. It takes about 20 seconds to paste a zero member bitmap into 100 channels, and then they are ready for use, without any puppeting hassles. No need to place an instance off stage, because the sprite's member is an empty member. I then use a master parent object to manage the usage of the sprites - assigning them to certain uses, then resetting them to a base state via one control object. It's a comfortable system, for me, anyway. I've been toying with behaviors that reserve their channels with the master object, thus removing their IDs from the main object's "open channel" list... but that's another subject.


2 centsing,
Kurt

[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!]

Reply via email to