Ok, we do have a testcase with sources for this now: testsuite/misc-ming.all/DefineEditTextVariableName.c
Just run 'make DefineEditTextVariableName.swf' under it's build dir to obtain an SWF (requires Ming). What I found out is that the VariableName is a kind of *reference* to the TextField's 'test' member. We currently don't support *reference* values. A reference would be somthing like a C++ reference, that is it is NOT a pointer, which you can point to another thing, it's really an *alias*. So, assigning to the reference would be the same as assigning to the referenced variable. Maybe we should add a new as_value type, being this *proxy* thing. The alternative would be making the VariableName be a reference to the TextField character, but this would give you an handle to the TextField itself rather then just to it's 'text' member, which is wrong. Since the as_value is used everywere, I don't feel very comfortable growing it's interface to support *proxies*, unless there are other uses of it. Comments ? --strk; On Wed, Sep 20, 2006 at 09:46:41PM +0200, strk wrote: > Finally read some books about this issue. > It turns out that /:PCNum is an *invalid* variable name. > It seems that SWF4 used that syntax as a synonim of > SWF5+ _root.PCNum. Now, I still don't know if for SWF4 > the /:PCNum syntax would be allowed *inside* the SWF > *OR* it should be the compiler transforming it to a different > assembly. Well, as long as the MM player works I guess the > former is correct, can anyone confirm ? > > REF: https://savannah.gnu.org/support/download.php?file_id=10791 > > --strk; > > On Wed, Sep 20, 2006 at 06:40:24PM +0200, strk wrote: > > Other news: our testcase actually shows that Gnash uses > > the same approach of GPLFlash (2, that is). This means > > that the ._x += 10 part actually moves the textfield, which > > should probably not. > > > > Anyway, it also shows that the referencing IS working somehow. > > Next problem is testing with a weirder variable name. This is > > because Ming seems unable to use non-alphanumeric chars in variable > > names.... (our testcase uses /:PCNum as a variable name) > > > > --strk; > > > > On Wed, Sep 20, 2006 at 06:25:50PM +0200, strk wrote: > > > Follow ups in this. I added a testcase in misc-ming. > > > The testcase shows that the "VariableName" should NOT be > > > used as an instance name (ie: <variablename>._x += 10 doesn't > > > move the instance). > > > > > > This means that GPLFlash is wrong and that we need a way to: > > > > > > - set/get variables from edit_text_character (it has no > > > reference to any environment, so we might have to add it) > > > > > > - make sure to fetch variable name when it changes > > > > > > Anyone with more knowledge of the codebase can tell me more > > > about the as_environment class ? Making a few tests I found > > > that there are actually multiple instances of that class, so > > > the comment above it (VM state) is wrong (I'd expect a single VM). > > > Also, it seems that sprite_instance as an as_environment member, > > > so that makes me think that as_environment is more similar to what > > > is referred-to as a 'timeline scope'. In that case *any* character > > > should be somehow able to refer to their 'timeline scope' (maybe > > > with a get_environment() method of the character class?). > > > > > > Comments welcome. > > > > > > --strk; > > > > > > > > > > > > On Wed, Sep 20, 2006 at 05:36:42PM +0200, strk wrote: > > > > The DefineEditText tag contains a "VariableName" attribute. > > > > Semantic of this attribute is not clear to me. > > > > > > > > Alexis' reference says that: > > > > > > > > << > > > > The text is defined in a variable (accessible in action scripts). It > > > > can be dynamically assigned and retreived. It is legal to have an empty > > > > string as the variable name (not dynamically accessible). > > > > >> > > > > > > > > So, I'm assuming that assigning to that variable will change the > > > > displayed text, and that retriving that variable would read the > > > > displayed text. Does this sound correct ? > > > > > > > > For a testcase, see https://savannah.gnu.org/bugs/index.php?17806 > > > > (https://savannah.gnu.org/support/download.php?file_id=10791) > > > > > > > > It seems to me that GPLFlash2 actually uses this as the default > > > > "instance name" instead, which seems incorrect (the above testcase > > > > for example uses an explicit "/" anchor in the variable name to > > > > attach the variable to the root). Also, a comment in Gnash seems > > > > to suggest this (server/parser/edit_text_character_def.h:126). > > > > > > > > So, any idea about who's right and who's wrong ? > > > > > > > > --strk; > > > > > > > > /"\ ASCII Ribbon Campaign > > > > \ / Respect for low technology. > > > > X Keep e-mail messages readable by any computer system. > > > > / \ Keep it ASCII. > > > > > > > > > > > > > > > > _______________________________________________ > > > > Gnash-dev mailing list > > > > Gnash-dev@gnu.org > > > > http://lists.gnu.org/mailman/listinfo/gnash-dev > > > > > > -- > > > > > > /"\ ASCII Ribbon Campaign > > > \ / Respect for low technology. > > > X Keep e-mail messages readable by any computer system. > > > / \ Keep it ASCII. > > > > > > > > > > > > _______________________________________________ > > > Gnash-dev mailing list > > > Gnash-dev@gnu.org > > > http://lists.gnu.org/mailman/listinfo/gnash-dev > > > > -- > > > > /"\ ASCII Ribbon Campaign > > \ / Respect for low technology. > > X Keep e-mail messages readable by any computer system. > > / \ Keep it ASCII. > > > > > > > > _______________________________________________ > > Gnash-dev mailing list > > Gnash-dev@gnu.org > > http://lists.gnu.org/mailman/listinfo/gnash-dev > > -- > > /"\ ASCII Ribbon Campaign > \ / Respect for low technology. > X Keep e-mail messages readable by any computer system. > / \ Keep it ASCII. > > > > _______________________________________________ > Gnash-dev mailing list > Gnash-dev@gnu.org > http://lists.gnu.org/mailman/listinfo/gnash-dev -- /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. _______________________________________________ Gnash-dev mailing list Gnash-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-dev