More problems with text fields stored as Flash swf assets

Any dynamic text fields get moved slightly up from their original position in the swf file.

Static text fields stored in a movie clip as keyframes other than frame 1 are significantly moved.

If static text fields stored in keyframes are converted to symbols, they are in the correct position when displayed.

Text field with a filter assigned to it, e.g. Drop Shadow, doesn’t display the filter. I only tested this with Drop Shadow,.

I have updated to lime 6.3.1, openfl (8.0.2) and have (3.4.7)

Here’s a link to all the pertinent files stored in a zip file:

Open the swf file to see what supposed to happen. The top text line is the text field with a drop shadow filter. The second text line has static textfields except for the “Wash #2” field which is a dynamic field. The third text line has all static text fields converted to symbols.

Thanks in advance!

Thanks for the sample, we’ll try and take a look :slight_smile:

Hmm, this is a tricky one.

I believe (conceptually) the issue is that the matrix of the earlier static text instances are supposed to be applied to the later ones, but since they are separate objects, our parser is not connecting those two together. There is a big PR with improvements to MovieClip, which may account for this. I’ll need more time to look into that, and see what we can pull out. Thank you again for the sample

hi, also when you right click on the input text field you will not get the default behavior of copy paste select all options which comes on any input text field anywhere.


I’m not sure we could do this without a fake/custom context menu, since our text is rendered is commonly rendered with WebGL, so it isn’t a real text element

:stuck_out_tongue: got it i will try with fake custom context menu for it , i don’t know if it will work or not but i will give it a try . at least for copy paste options it will be enough for my forms :smiley: thanks

Another option is a DOMSprite with input text on the DOM target

i will try it , but i never knew about it :smiley: i have to learn more .

My examples used the Open Sans font. Was working with a project using Myriad Pro and observed that the text in the dynamic fields were moved down. I added borders and rectangles to see if the field itself was moved but it wasn’t. That might help someone figure out what’s causing this.

Here’s a link to the associated project files:

It looks like it works properly on native, so this might be based on the limitations of HTML5 text rendering. There are some pull requests to read (and encode) the ascent, descent and other values for the font at compile-time so that we have that information for HTML5 to improve rendering, but it needs a few more tweaks before we can merge. That might help

1 Like

This is probably related. The letter spacing setting of dynamic text fields stored in swf files has no visible effect.

It is a known issue on github that isn’t fixed yet.

Another problem. I can change the rotation of a dynamic textfield in the swf asset but changing the rotation of a textfield by code, e.g. myTextField.rotation = 90, has no effect.

Note: the rotation field value of the textfield is changed, but the textfield’s visual rotation is not.

Hmm, interesting. This only affects TextFields from the SWF? You can rotate them elsewhere?

Don’t know about rotating textfields created with code. I’ve had other problems with text fields created with code.

I’m converting Flash projects to HTML5 so I really want to lay out all the text fields as well as many as possible of the graphics elements visually using the Animate CC GUI editor and not rebuild old ones and create new ones in code.