ActionScript 3.0 :: Using A Mixture Of Bold/italic Embedded Fonts In One Textfield?

May 21, 2010

I have an HTML string that uses bold and italic tags which I need to apply to a TextField. I need the font to be embedded though and I can't seem to find a way to do this. From what I've read it seems that Flash needs to use the actual bold/italic versions of the font rather than just changing it with HTML? In which case I can't do it all in one textfield because you can't change font? The only solution I found was a suggestion to use the [Embed()] method rather than the method I am using (embedding the font in a library symbol) but I don't think you can do that either with Flash CS3?

View 5 Replies


Similar Posts:


Actionscript 3.0 :: Embedding Fonts XML CSS Bold Italic?

Oct 23, 2008

I've been trying everything with this issue so thought I'd put it out there to see if anyone can offer a solution or even advise if this is possible or not.This is the scenario:

I dynamically create a textField. I load an external CSS file into a stylesheet. From an XML file I load HTML content into the textField via .htmlText I have added the font to the library and have made it available for Export for ActionScript The HTML has spans with classes eg:

<span class="boldText">Flash Flash Flash</span>

The CSS states:

.boldtext {
font-family:Anivers;
font-style:italic;

[code]....

The font I'm using does not have any other family members like bold or italic Here is the problem. Leaving embedFonts = false things work just fine. But obviously I need to embed this font so all can see it. As soon as i set embedFonts = true I no longer get bold or italic.Is this a case of because the font does not have a bold or italic the system it just rendering, or am I just missing something? For example the checkboxes in the font's properties where you can choose bold and italic. I tried these but no luck.

View 13 Replies

ActionScript 1/2 :: Embedding Bold+italic Fonts For HtmlText?

Feb 24, 2010

How can I embed my custom font and it's bold variant (and it's faux italic variant, because there is not real italic version) and get the b and i tags working in a htmlText field?I can use the htmlText field with system fonts (with b and i tags working) ... or I can use 1 of the embedded fonts for the whole text.but I can't seem to get flash to understand the bold and italic variants are also embedded.

createTextField("dynamic_txt", 2, 40, 170, 350, 350); dynamic_txt.embedFonts = true; var emphatic:TextFormat = new TextFormat(); emphatic.size = 40; emphatic.color = 0xFFFFFF; emphatic.font = "EurostileT"; dynamic_txt.html = true;[code]...

View 2 Replies

ActionScript 1/2 :: Bold And Italic Fonts In Dynamic Text Fields?

May 24, 2006

I have a dynamic text field with the text "IMAGES". The font is Arial, it has BOLD and ITALIC checked, and has basic Latin fonts embedded. Now, I use Actionscript to change the text:

textField.text = "IMAGES";

Suddenly the text disappears! Now, it seems to me that since BOLD and ITALIC are checked on the text field, changing the .text value should simply change the text itself, which should then be rendered in bold and italic, and since I have bold+italic Latin glyphs embedded, it should display properly. But what's clearly happening is that when I set the text using Actionscript, it is attempting to display the NORMAL font instead, and since it's not embedded, it won't display. I know this because if I create another proxy text field off the screen and embed the NORMAL Arial glyphs, the original text field's text will display just fine - as normal-weight text.

But why is this? Do I have to use a TextFormat object to set the text to Bold and Italic EVERY time I want to dynamicaly change the text? This seems silly. I simply want my text field to be bold and italic every time the text changes, and NO normal text!

View 1 Replies

ActionScript 2.0 :: Bold, Italic And Bold/italic Won't Embed?

Jul 18, 2009

I've imported four fonts into the Library and used Linkage to enable Export for Actionscript. The fonts are the four versions of Trebuchet MS:

Trebuchet MS
Trebuchet MS Bold
Trebuchet MS Bold Italic
Trebuchet MS Italic

They are named like this in the Library and for example the 'Bold Italic' version has both 'bold' and 'italic' selected in its properties.

Then I drew a dynamic textfield and selected for it's font 'Trebuchet MS Bold Italic*' so that the embed font was used. I also embeded the glyphs for 'Basic Latin' and 'Latin 1'.

Then I used this code to fill it with text:

ActionScript Code:
my_txt.embedFonts = true;
my_txt.text = "This is a sample";

The text is placed, however, it is always in the Trebuchet MS regular font. Also when I click the bold and italic icons in the Property Bar, the font won't go bold/italic. The same for just bold and just italic. It only turns bold/italic when I delete all font symbols accept the Bold Italic one.

View 9 Replies

Use Bold / Italics For Embedded Fonts?

Nov 4, 2010

I have a shared fonts.swf file containing a variety of fonts that my main swf uses. I have a movieclip within the fonts.swf file which is exported for runtime sharing. In my main swf i have the fonts.swf imported for runtime via a movieclip. This all works fine and allows me to use the fonts within the fonts.swf file in my main swf. All of my text fields are dynamic and created/updated via AS. I use the following method to style my text boxes(additional code removed for succinctness, this is just so you can see the overall methodology)[code]...

View 3 Replies

ActionScript 2.0 :: Get Embedded Fonts Bold In Flash CS5

Nov 18, 2010

I try to do a site for a community against child abuse, I've got external text files and have choosen render as html. I choose Verdana regular font and embed some swedish characters. When I then write something in the text file it works OK, and so with the <i>, <u> and <li> tags but when I write <b> tags nothing happends at all. Then I tryed to embed the bold font and everything went bold, why is it so? How do I make the bold tag work?

View 1 Replies

ActionScript 3.0 :: Bold And Regular Text With Embedded Fonts CS4

May 12, 2009

Anybody know the trick to getting both bold and regular text in a dynamic text field? I can do it with system fonts no problem (using htmlText), but the client wants copy to be Futura Medium and Futura Bold. I'm pretty sure this isn't the first time anyone's had to do this.

View 1 Replies

ActionScript 3.0 :: StaticText Class Bold / Italic

Sep 10, 2009

I can access the read only text property of a StaticText instance (added at design time) by using "for(i=0; i <this.numChildren; i++) .... etc".I can use this text, I can trace it, etc, and I know that you can't write to it (ie its read only). BUT can I some how test that text to see if it is bold/italic/regular?[code]The charCode is the same bold or not, sort of obvious after I think about it.

View 2 Replies

ActionScript 2.0 :: Can't Control The Bold And Italic From The Text?

Apr 15, 2005

i made my flash design loading text from a txt file. But the problem is that i can't control the bold and italic from the text.So what i need is kinda content management. The company where i make the design for want to have control of the contant. I already did a quick search about loading html in flash but i wasn't lucky to find anything usefull.

View 2 Replies

ActionScript 3.0 :: Embed Both - Bold And Italic Styles Of A Particular Font?

Nov 15, 2010

How to embed font so it would have both styles - bold and italic.

When creating new font from drop down menu there are only either bold or italic or other style, but how to embed font with all styles?

View 0 Replies

ActionScript 3.0 :: Bold Italic Font Face Doesn't Show Up?

Oct 13, 2009

I am putting the finishing touches on an as3 project (developped in flex for code and flash cs4 to create the UI) and I am running into a mysterious font issue.
 
1) I am loading in a swf file with the font outlines (empty dynamic textfields with embedded characters on the stage.  One text field for each regular / bold / italic / bold italic font styles).
 
2) I then load the swf and then in order to make sure that all font faces are properly available I list them in the output window with the following function:

[Code]....

View 3 Replies

ActionScript 3.0 :: Write An Editor, Which Only Outputs Bold (<b>) And Italic (<i>) Tags

Feb 7, 2009

i have a problem with the flash textFormat. I want to write an editor, which only outputs bold (<b>) and italic (<i>) tags and not the other information flash adds to an htmlText.

for example in this case the output trace (myTextField.htmlText) should be exactly the input.

ActionScript Code:
import flash.text.TextFormat;
myTextField.htmlText = "huhuh <b>asjdja</b> asdasd";
trace (myTextField.htmlText);

is there a cleaner solution than replace the other information (font-size etc)

View 0 Replies

ActionScript 2.0 :: Html Formatting XML / Issue With Bold And Italic Tags Only?

Jul 12, 2006

I'm loading an xml file into flash. I have formatted certain parts of the xml file with various html tags, however I run into problems with the <b>bold</b> and <i>italic</i> tags. Even though I have <a href> and <ul> tags working fine?

I have set my text field to html while also using the "myTextfield.htmlText = " as well as using the CDATA tag in the xml file. I also checked the macromedia livedocs, and it says that these tags are standard and are handled by the flash player...

View 14 Replies

ActionScript 3.0 :: Using A Character In XML File To Bold Or Color Or Italic Certain Text ?

Jan 27, 2012

I am using XML file to pass text into a SWF. How can I use styles, either inline or external, to make certain text in the middle of a sentence appear italic or colored or bold, etc. A character or somethinng that you can put right in the XML file.


Code:
<mainText>You have the email message with two domain names: character here hackistan.edu character here and >kevinsgym-uoh.co<. Below is a list of resources to discover more information. Match the web site with the type of information you would expect to find.</mainText>

View 1 Replies

ActionScript 3.0 :: Fonts Embedded Within Dynamic TextField

Nov 24, 2009

Presume there is a textField with fonts embedded using Flash (CS4) IDE's "Character Embedding" option of the textField property panel.How these embedded characters are stored actually?Is the embedded fontset accessible beyond this single textFiled and how?Is there any way to clone such a textFiled in runtime having a new dynamic textFiled object with all embedded characters included?

View 9 Replies

ActionScript 3.0 :: Fonts.registerFont From Embedded Textfield?

Jun 16, 2009

is it possible to register a font which is embedded in a textfield? i dont want to export the font as class due visible editing options.iam not sure how to get the font as class...

View 3 Replies

ActionScript 3.0 :: Bold And Italic Are Not Working For Normal Embed Font In Flex

Feb 2, 2012

I am using swf embed font[normal] in my flex application but if i apply bold or italic for the text,its looking normal only. let me know if you have any solution.

View 1 Replies

ActionScript 3.0 :: Show Multiple Embedded Fonts Into A Html Textfield?

Sep 29, 2010

I'm using Flash CS5 , Actionscript 3.0 and export fo Flash Plaer 10.
 
I create a class, myHtmlText.as, that builds a basic TextField. I create an empty file myHtmlText.fla I embedded two fonts inside the myHtmlText.fla: "Ghotam Light" and "Ghotam Book"; I selected all characters for each font and exported for actionscript with the following linkage name: "GhotamBook" and "GhotamLight"
 
I wish to use the fonts embedded, in the TextField using htmlText, like this:
 
var tf:TextField = createTextField(10, 10, 400, 22);     tf.htmlText = '<p><font face="GhotamBook">Lorem ipsum dolor sit amet.</font></p>';
//tf.embedFonts = true;

[Code]....
 
but it does not work; the text is not displayed; If I use .text instead fo .htmlText, the latin text is displayed with a system font.

View 5 Replies

ActionScript 3.0 :: RotationY On Textfield With Embedded Fonts Doesn't Work

Jan 18, 2010

i have a text field that I create in flash, when rotate it on the y axis with actionscript, I encounter problems, the text gets bigger and doesn't fit inside the text field, when i don't embed the fonts or use device fonts, it works fine, but I need the text to be consistent across all user computers, any ideas, i'm using cs4 and as3

View 1 Replies

ActionScript 2.0 :: Flash File Called In Xml Into A Dynamic Textfield - Embedded Fonts Greek

Mar 25, 2009

I am really at a lose end with this - I have a flash file called in xml into a dynamic textfield. It works fine with English but when I try and put Greek into the xml the flash file then doesn't show the font. The font is verdana - which can be translated and I have embedded the font, with greek and made sure my xml is unicode-8 - but it still shows nothing.

View 4 Replies

Custom Italic Fonts In Flash?

Jun 24, 2011

Wonder if anyone has run into a situation in which Flash fails to recognize an embedded font with a title like "Gotham rounded" and a style of "italics?" I can't seem to embed the style because of the double name of the font.

View 1 Replies

Actionscript 3 :: Programmatically Set "Faux" Bold And Italic Font Styles In Flex?

Feb 4, 2012

I have a client that I build a business card "builder" application for in Flex. All the text elements that users add to the stage are Flex spark TextArea. I have a list of fonts that we allow the user to set on the text areas and some of the fonts included do have Bold and Italic versions of the font. The others that do not I simply disable these options in the control panel so the user doesn't have the option to click bold or italic buttons.

Photoshop does something similar if you load a font that doesn't have Bold or Italic options they disable the dropdown that would allow you to select these options in the text pallet http://grab.by/bOTC

When bold and italic aren't an included font face then Photoshop as a couple of buttons for applying Faux Bold and Italic to the font. Basically they programmatically thicken up the font face or slat it to make it look italic.

I've tried just setting fontWeight and fontStyle on the fonts that don't have bold or italic included in the embedded fonts and the result usually is a "web safe" font shows instead of the selected font or nothing at all happens.

I am wondering if there is a programmatic way that anyone has found that will do this in Flash / Flex. Basically thicken the font face or tilt it slightly to look italic. My guess is this would be pretty difficult and not worth the time and effort to the client but would be a neat thing to figure out and have a solution for.

View 2 Replies

Flash :: Runtime Fonts Not Playing Nice With Fonts Embedded In Static Text?

Jul 11, 2010

I save my (embedded) fonts in an external file (fonts.swf) that gets loaded at runtime. Pretty standard. I also use a bunch of UI artwork generated in the Flash IDE. Some of this artwork contains static textfields (thus, not proper TextFields that can change. Just frozen glyphs). Here's the problem: if I use the same font in any static textfield and then embed that same font into my collection of runtime fonts, the runtime font will refuse to render. It's the same effect you get if you set a textfield with embeddedFonts=true to use a font that isn't embedded. If I change the static textfields to use a different font, the runtime fonts work just fine.

[Code]...

View 2 Replies

Flash Detect Missing Embedded Fonts And/or Replace With Available Fonts?

Dec 22, 2010

Edited Short Version:The Adobe Flash docs list a property embedFonts on TextAreas:

A Boolean value that indicates whether the font specified in fontFamily is an embedded font. This style must be set to true if fontFamily refers to an embedded font. Otherwise, the embedded font is not used. If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed. The default value is false. Regarding the "If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed" statement: How can I detect in ActionScript when this scenario happens?

TL;DR Original Version: I have a flash application which loads external .swf files containing embedded fonts, so that these fonts can be used within the main application. We're accomplishing this by using the following ActionScript code on anything which uses custom fonts:

[Code]...

View 1 Replies

ActionScript 3.0 :: Embedding Fonts But Text Getting Bold

Oct 18, 2010

When Embedding fonts in as3 the text getting bold is there any way to rectify it.

View 2 Replies

IDE :: How To Get Text Render Fonts In Bold Or Italics

May 7, 2009

I've seen this a few times and I've tried all the "fixes" but I'm still missing something here. I have "[CDATA[" tags and render as HTML turned on. My AS has HTML "true" and childNodes. However I still can't get my text to render fonts in either BOLD or italic. [URL].

View 1 Replies

ActionScript 2.0 :: Bold Dynamic Text W/ Device Fonts?

Nov 3, 2009

I have an xml-based mp3 player which loads the track titles into dynamic text fields from an external .xml file and I can't get the text to bold. I have "use device fonts" checked. If I select the text field in Flash and change the color or size those attributes will change in the published version, but... when I click the B button, it won't render the text bold in the published version.Do I have to add additional font formatting in the actual ActionScript? Here's the AS for the player. I only want to bold the track title which (I think) is about half-way down -- track_title.text = track_list[current];[code]

View 5 Replies

ActionScript 3.0 :: Keeping Bold Attribute For Embedded Font?

Dec 4, 2008

I've got a bunch of dynamic and input text boxes. I want the display font to be Arial-bold. I don't have a genuine Arial-bold font so what I really want is Arial with a bold attribute. I've tried all of the following but the result is always just plain Arial:

1. Put dummy text in box, specify Arial, click Bold attribute, click Embed and include numbers and punctuation - run time result: plain Arial

2. Import Arial to library, give it the name f-Arial Bold, click the bold attribute box, check linkage and export for AS3 in first frame, get warning about class name (not sure why), put dummy text in box, specify f-Arial Bold*, click Embed and include numbers and punctuation - run time result: plain Arial

View 1 Replies

IDE :: Using The Bold Tag Within HTML Embedded Text Doesn't Work

Nov 12, 2008

just downloaded the flash cs4 trail, very nice some of the irritating IDE bugs are gone that i had on my mac, and didn't had on windows. but enough of that

The first project i checked out, a bug jumps up.when you create a texfield on stage, make it html text. set it to verdana or arial regular, emded the basic symbols.give the textfield a name and try to make some bold text using actionscript.

Code:
my_textfield.htmlText = "regular text, <b>bold text</b>"

preview it and every thing stays regular.the only way to get right is to embed the font styles in your library. but for some of the more special symbols, that's not good enough.that's the only reason i re-installed flash cs3, after thinking maybe that was the problem.

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved