[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] DefineEditText variable name and globals
From: |
strk |
Subject: |
Re: [Gnash-dev] DefineEditText variable name and globals |
Date: |
Wed, 20 Sep 2006 21:46:41 +0200 |
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
> > > address@hidden
> > > 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
> > address@hidden
> > 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
> address@hidden
> 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.