dyn_beh

  behavior dynamically attached to a sprite created to an empty channel with lingo will remain in the channel
behavior dynamically




  sprite voodoo behavior problem
A behavior dynamically attached to a sprite created to an empty channel
with lingo will remain in the channel even if the play head moves to
other frames.

In the current frame the sprite channel 1 has no sprite.  Then puppet
the channel and assign a member.  (I tried the following script from the
message window.)

	sprite(1).puppet = 1
	sprite(1).member = member(1)

Now attach a dummy parent script to the sprite.

	sprite(1).scriptInstanceList.append(new(script "dummy"))

Then unpuppet the sprite channel and the sprite disappears from the stage.

	sprite(1).puppet = 0

Go to the next marker.  In the frame the sprite channel 1 already has a
sprite attached the behavior "MyBehavior" onto.  But it does not exist
any more and the script "dummy" remains instead.

	go next
	put sprite(1).scriptInstanceList
	-- [<offspring "dummy" 1 82d9bd8>]

This problem does not occur once the sprite channel has any sprite in
the score.  Any suggestions would be very appreciated.

Fumio Nonaka

Home shock + cgi Bits 'n pieces Director Lingo ShockLets Contact