ActiveDen

Embedded font/ TextField problem

836 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
marcfolio says

As you can see in the above example I am having trouble with my dynamic text and cutting the top off the first line of letters. here’s my code for the text field.

var column_txt:TextField = new TextField();
        column_txt.width = width;
        column_txt.height = height - space_for_page;
        column_txt.selectable = false
        column_txt.mouseWheelEnabled = false
        //column_txt.autoSize = "left" 
        column_txt.multiline = true
        column_txt.wordWrap = true
        column_txt.styleSheet=css;
        column_txt.htmlText = txt
        column_txt.antiAliasType = AntiAliasType.ADVANCED;

It’s being styled through a CSS file I have.

Help!

1 year ago
137 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
XanderRock says

I don’t understand correctly. Are you having problem like “the top of your text cutted”? And why are you changing textfield height? I think you should get textHeight first to learn textHeight so you can give the textfield a correct number for its height

1 year ago
836 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
marcfolio says

Sorry to be more clear. If you look at the screenshot I posted you’ll see the top of the first line the letters are cropped off. It’s like they poke out of the textField and aren’t displayed and as such 1-3 pixels are chopped off.

As for the textfield height. The text function is part of a column text generator I built. So you can define the height and width and if the text is too long it flows to the next column.

1 year ago
137 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
XanderRock says

Now its more clear. I now realize there are some 2 or 3 pixel lost in your first line. Possible reasons ;

1 – There could be a mask that you didnt size correctly
2 – There could be a layer on higher level than your text
3 – I dont even ask if you embbed your font with mimeType
4 – You might be using some weird font (Im not pro at different font families Im good with Trebuchet) that acts weird when size changed

But if you ask me, I think there is definitely a layer on text field. A mask or something probably

1 year ago
836 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
marcfolio says

There’s no mask anywhere in my file. I’ve had this problem before with textfields I create on the stage if they’re not size the right size, but this is done with code. You’d think flash would calculate it correctly.

Yeah the font’s are all embedded.

Hmm.

I’ll see if adding a blank line above it fixes it.

1 year ago
44 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 10 and 49 items
  • Europe
  • Referred between 10 and 49 users
freshline says

It can be also a CSS / html formatting issue. If you i.e. use leading with negative values, (also blockindent with negative values). I had same problem in my last project.

1 year ago
836 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
marcfolio says

It can be also a CSS / html formatting issue. If you i.e. use leading with negative values, (also blockindent with negative values). I had same problem in my last project.

I don’t use any of those. So far my answer has been to add a blank line above the first line. That fixes it. I’ve tries setting the leading, line-height, but nothing seems to change it.

1 year ago
3678 posts
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Brazil
  • Referred between 1 and 9 users
tsafi says

Even If your text is on the stage you can still add TextFormat function via code then just specified

fmt.leftMargin =number; or fmt.rightMargin = number; or fmt.leading = number; That should do the trick for you

Don’t use blank, since if the buyer will mass with it he will have the same issue

1 year ago
44 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 10 and 49 items
  • Europe
  • Referred between 10 and 49 users
freshline says

Do you use textformat leading=”x” where x is a rounded value? maybe you have image in this tag with hspace and vsapce in with negative values , and the image is not available?

It can only have an influence from the html formatting, or a mask from flash. Or the Margin as tsafi said. Sounds really dizzy.

1 year ago
137 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
XanderRock says

Is it same when you do it with flash instead of codes? like using textField tool. Because it sounds like margin/padding issue. Specially from the top

1 year ago
by
by
by
by
by