----- Original Message -----
From: <[EMAIL PROTECTED]>
>
> has anyone else come across an issue by which you cannot set the variables
> of a puppeted Flash sprite?

I don't generally use Flash at all, so I can only guess...

> If I put the sprite directly onto the stage then the setVariables command
> is fine, but if it is puppeted then the setVariables command is not
> recognised. Any work arounds?

The trouble with dynamic puppets (and the big reason they are still
undocumented) is that Director sets different sprite properties depending on
the type of the member. With dynamic puppets, it does not know what type the
member is, so type specific properties tend not to work.

This is quite common, and is probably causing the problem you are having
with Flash. Imagine trying to call setVariables with a bitmap; it wouldn't
work. The problem is that Director does not know it's a Flash sprite, so you
can't use Flash specific commands.

The workaround is simple, but annoying. Wait a frame. When the playhead
moves to the next frame (or jumps back to the current frame) the stage
updates the properties of the sprites. Dynamic puppets then begin to act
normally as if they had been placed on the stage.

This simply means you cannot create the sprite and then call the functions
you want. You need to create the sprite first, set a flag to say
sprite-x-needs-updating, then on prepareFrame (in the /next/ frame), call a
handler that does all the member-type specific updates you require and reset
the flag.

BTW, remember that dynamic puppets /are/ undocumented, so if this workaroud
does not work, you may find that there simply is no workaround. That is
unfortunately just the way it is with undocumented stuff. However, I suspect
that it will work, as it solves every similar problem I have come across so
far with other member types.

- Robert

[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