In Flash editor you can create text which is positioned vertically.
It has some strange format of SWF file upon compilation.

Let’s start with static horizontal text. We place static text on the stage.
This text is compiled as follows:


The SWF structure has:
- Font inside DefineFont3(1) tag along with DefineFontAlignZones/DefineFontname tags
- Single DefineText(2) tag with attached CSMTextSettings, which has the fontId 1 set
- The PlaceObject2 tag which places the text (characterId = 2) on the stage
The vertical text
Now let’s proceed to the vertical text.
The vertical text has special handling of letterspacing inside its DefineEdit text.

But what’s more important and very strange is the overall structure of SWF file.

In this case, SWF looks like this:
- It has DefineFont3(1) with DefineFontAlignZones and DefineFontName
- DefineText(2) with attached CSMTextSettings, which has the fontId 1 set
Now for the weird part: - Second DefineText(3) without fontId set with attached CSMTextSettings
- DefineSprite(4) which has three PlaceObjects2 inside.
- PlaceObject2 with font (1) as placed character
- PlaceObject2 with the text (2) as placed character
- PlaceObject2 with the second text (3) as placed character
- PlaceObject2 which places the DefineSprite(4) on the stage.



This is very different from the horizontal text. I still wonder why there is the font on stage and the second text, because if I tried to delete those unnecessary placeobjects with FFDec, the SWF was still displayed fine.
If anybody knows why its there, then let me know in comments, it is still a mystery to me.
P.S. It works this way even in latest Adobe Animate
Leave a Reply