[Top][All Lists]

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

Re: [Swftools-common] Use of obsolete NAMECHARACTER

From: Paul K. Young
Subject: Re: [Swftools-common] Use of obsolete NAMECHARACTER
Date: Wed, 5 Dec 2012 11:13:36 -0800

The code for where swftools writes this out is in src/swfc.c.  It occurs in one function, s_addcharacter (included below), which gets called for a variety of types - boxes, images, audio files, etc.  Its use in export seems to be at odds with the above documentation which indicates that it is obsoleted by PlaceObject2, the purpose of which is to place characters on the stage.

Since swfc is actually outputting this flag, not just recognizing it in existing SWFs, I had hoped someone on this list (perhaps the author?) could offer insight as to its purpose in swfc output.

from swfc.c:

static void s_addcharacter(const char*name, U16 id, TAG*ctag, SRECT r)
    if(dict_lookup(&characters, name))
        syntaxerror("character %s defined twice", name);
    character_t* c = character_new();

    c->definingTag = ctag;
    c->id = id;
    c->size = r;
    dict_put(&characters, name, c);

    if(do_exports) {
        tag = swf_InsertTag(tag, ST_NAMECHARACTER);
        swf_SetU16(tag, id);
        swf_SetString(tag, name);
        tag = swf_InsertTag(tag, ST_EXPORTASSETS);
        swf_SetU16(tag, 1);
        swf_SetU16(tag, id);
        swf_SetString(tag, name);

On Wed, Dec 5, 2012 at 2:58 AM, Jos Castellani <address@hidden> wrote:
The best I could find, was this piece of information:

It says:
"Define the name of an object (for buttons, bitmaps, sprites and sounds.)"
"Intended to name objects so one can reference them in an ActionScript. Instead, PlaceObject2 was used which is better since one object can be placed multiple times in your display list and each should have a different name."

I didn't read the whole source code of SWFTools, though. Maybe it would make everything more obvious.

(NAMECHARACTER is not the only obsolete tag supported by SWFTools)

  ----- Original Message -----
  From: Paul K. Young
  Sent: 12/04/12 11:13 PM
  To: address@hidden
  Subject: [Swftools-common] Use of obsolete NAMECHARACTER

I was analyzing the output of some SWFs produced by swfc and found that it uses the obsolete NAMECHARACTER tag.  Is this for backward compatibility with older Flash runtimes, and if so, what does the NAMECHARACTER tag do in those runtimes?  Adobe doesn't document this tag, so any advice on its function would be greatly appreciated.


reply via email to

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