[moved thread to gnash-dev due to broader interest]
On Wed, Dec 20, 2006 at 10:36:14AM +0100, strk wrote:
[ .. after new commits .. ]
gravity_embedded-TestRunner is failing again with this, but there's
an hint about why:
10:32:46: WARNING: A sprite member (container) clashes with the name
of an existing character in its display list!
The member will hide the character.
I'm tracking this one now..
I think I found the culprit.
gravity-embed.swf seems to be doing something like this:
container = createEmptyMovieClip("container", ...)
This creates a 'container' variable AND adds a 'container'
character in the display list. The clash is handled by
giving precedence to the variable, but it's not a big deal
as they both point to the same as_object, being a sprite_instance.
Leter on, the movie *loads* an external sprite in the container.
This results in the "variable" and "display_list item" pointing
to a different object.
The solution that comes to my mind is NOT storing sprite_instance
objects as instance pointers in as_value, but rather store the
sprite *target* ("_level0.container" in this case).
This seems to be the way to go, considering also the fact
that typeof(container) should return 'movieclip', while currently
it returns 'object' for MovieClips.
By storing the clip 'target', the as_value would be a reference
to a *target* rather then to a specific instance. This also means
that reference counting would NOT be incremented by assigning a sprite
to an as_value, and that might result in unexpected other bugs
(read: opening a can of worms). Anyway, I think it is worth taking
Gnash-dev mailing list