- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
where does the “strVariable” and “textField” text come from, both textfields? If the textfields are multiline enabled then thats likely it…
where does the “strVariable” and “textField” text come from, both textfields? If the textfields are multiline enabled then thats likely it…
I just changed the variables into plain strings and it still gives line breaks after a tag, except if its the regular Arial.
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
where does the “strVariable” and “textField” text come from, both textfields? If the textfields are multiline enabled then thats likely it…I just changed the variables into plain strings and it still gives line breaks after a tag, except if its the regular Arial.
then i’m as lost as you are i’m afraid 
I dont usually use the font-family tag, that could be the cause of it else i’ve got no idea without sitting down and playing with it 
I have a question about setting this embedding on via AS. While using the manual method, creating a textfield, going into it’s parameters you are able to select only specific characters to embed. When the embedding is on via AS, which characters are embedded? All? Isn’t that overkill? Just the ones that are used? How would you know which ones will be used? I’d create a dummy field with all the chars I’d like to use if this is how it works. But how to inherit that setting to other fields? So? 
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
I have a question about setting this embedding on via AS. While using the manual method, creating a textfield, going into it’s parameters you are able to select only specific characters to embed. When the embedding is on via AS, which characters are embedded? All? Isn’t that overkill? Just the ones that are used? How would you know which ones will be used? I’d create a dummy field with all the chars I’d like to use if this is how it works. But how to inherit that setting to other fields? So?![]()
adding the font to the library i’m pretty certain adds the whole font… if you use runtime embedding (link on prev page) then you can choose which characters to embed
this is only with CS4 and FP10 though I think… (may be wrong)
I have found the solution to my problem by reading this page(bottom post by fabiolune): http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=21101
So now my string looks like this:var mynewstr:String = "<span class="arialBd">" + strVariable + "</span>" + ": " + "<span class="arial">text </span>" + "<span class="ariali">" + textField.text + "</span>" + " more text" + "\n"And my css file has changed to this:
.arial
{
font-family:"Arial"
font-size:12px;
color:#000000;
}
.arialBd
{
font-family:"ArialBd"
font-size:12px;
font-weight: bold
color:#000000;
}
.ariali
{
font-family:"Ariali"
font-size:12px;
color:#000000;
}
Works great
no line break issues happening after using css tags and size/color/font-family work perfectly. Hope this helps anyone else that gets stuck with this problem.
- Attended a Community Meetup
- Community Moderator
- Has been a member for 5-6 years
- United Kingdom
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Contributed a Blog Post
- Beta Tester
- Bought between 50 and 99 items
ahhh, span, of course, dont know why I didnt see that lol, bravo though 
I worked around this problem.. Everything in my current project is pure AS, that’s why I joined this conversation. Then I realized it might be better if I place a manually created textfield on the Stage, on which the user can set all the font options he wants, then I can play around, duplicate, resize, etc with AS later.
