Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
stefanpetre

Transform TextField makes text disappears

Recommended Posts

Hey,

 

So I have a small application where the user can add TextField and I use TransformManager to allow them to move/rotate/resize. Everything works OK, except on IE 7 Flash Player version 10.0.42.34 . Every time the TextField is transformed the text inside disappears.

 

Every TextField has font embeded. Here is the code I use to generate the TextFields:

var newField = new TextField();
newField.embedFonts = true;
newField.wordWrap = true;
newField.type = "input";
newField.border = false;
newField.autoSize = TextFieldAutoSize.NONE;
newField.background = false;
newField.setTextFormat(defaultFormat);
newField.defaultTextFormat = defaultFormat;
newField.multiline = true;
newField.text = config.default_text;

 

Can someone help me? Thanks

Link to comment
Share on other sites

Here is the code for the default format I use

defaultFormat = new TextFormat();
defaultFormat.font = fonts['Arial'].fontName;
defaultFormat.size = 20;
defaultFormat.color = 0x009900;

Link to comment
Share on other sites

Just because you set embedFonts = true does NOT mean the font is actually embedded. You must make sure that Flash puts the actual font into the swf. There are a few ways to do it, but what I typically do is make sure that I put a TextField somewhere in the swf which I click the "embed fonts" button for and select all the characters I need. Feel free to look at the Adobe docs to learn about other ways to do it too.

Link to comment
Share on other sites

Sorry, I did not mention that. I embedded the fonts in the library. I have 2 fields for each font in part, embed and all. The file size is around 1 Mb so the fonts are there, compiled.

Link to comment
Share on other sites

It sounds like there must be something else going on in your file then - please post a sample FLA that demonstrates the issue (make it as simple as possible if you don't mind).

Link to comment
Share on other sites

http://eyecon.ro/designer/designer.fla

it has just the fields for embedded fonts and some things in the library

 

http://eyecon.ro/designer/designer.as

method 'addTextEl' (line 551) inserts the TextField objects and attaches it to TranformManager object

 

Thanks a lot for taking your time with this and if this issue is not related to TransformManager then let it be.

Link to comment
Share on other sites

If you want help with this, please don't post your production file that has multiple dependencies on other class files, etc. that are not included. I could not publish your FLA. Please isolate the problem in a separate (extremely simplified) FLA and just post that so that I can quickly publish it and see the issue. Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×