gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] MovieClip as_value


From: Rake Xue
Subject: Re: [Gnash-dev] MovieClip as_value
Date: Wed, 20 Dec 2006 18:27:15 +0800
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

In fact, when flash creates a character with a specified depth, but that depth has been occupied by an exist character, then Macromedia does it just like this: remove the previous  character , add
the new created character. cuz. both createEmptyMovieCip() and attachMovie() are of Actionscrip, I guess there is a principle that Macromedia will always try to keep Actionscript goes well.
[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
this path.

--strk;



_______________________________________________
Gnash-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnash-dev
  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]