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


Similar Posts:


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

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 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 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 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 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 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 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

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 :: 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 :: 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

ActionScript 3.0 :: HtmlText - Text Shows Up Bold Instead Of Just The Few Lines Assigned The Bold Tag To

May 4, 2011

I have a dynamic text box for 3 lines of text. I styled part of the text to be bold and part of it to be regular. When i click on the button to display the text it looks right the first time but if i click on it a second time then all of the text shows up bold instead of just the few lines i assigned the bold tag to.

View 18 Replies

Embed "bold" Versions Of Verdana To Make Bold With AS?

Sep 14, 2010

-Adobe CS3 Web Premium. -Compiling using AS3. I'm pulling in some text values from an external XML file for a "next" button and I set the font to bold when I made it Verdana. I'm not sure why but it still is normal verdana when I compile it.

I've found several posts similar to mine saying I need to embed the bold version of the font, but I don't have the option of purchasing or creating a bold Verdana. Since it is just Verdana, is there not a method I can use to simply bold the text?

View 1 Replies

ActionScript 3.0 :: XML Italic Not Working?

Sep 9, 2010

I have a swf in AS3 pulling a content from a xml but I can't use Italic on the font.

Actionscript Code:
Action Scriptvar urlLoader:URLLoader=new URLLoader();urlLoader.load(new URLRequest("xml/news.xml"));urlLoader.addEventListener(Event.COMPLETE,onXMLFileLoaded);stop();function onXMLFileLoaded(e:Event):void{  var myXML:XML=new XML(e.target.data); content.text=myXML.content;content2.text=myXML.content2;}

[code]...

View 4 Replies

Actionscript 3.0 :: Italic Not Working On SWF XML?

Sep 9, 2010

I have a swf in AS3 pulling a content from a xml but I can't use Italic on the font.

Code: Select allAction Script
var urlLoader:URLLoader=new URLLoader();
urlLoader.load(new URLRequest("xml/news.xml"));

[code]....

View 1 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 2.0 :: Copy And Paste Italic Writing?

Jan 29, 2012

I want to be able to copy text which is in italics already from a text box and then paste it into word with it still being in italics.

Is there anyway of copying a word and keeping the italic attribute so that when pasted in a word document it still remains in italics?

View 2 Replies

Flash 10 :: Good Italic Serif Font (like Georgia) That Renders Well In Flash At 10pt?

Jul 19, 2010

Just wondering if anyone knows of a good italic serif font (like Georgia) that renders well in Flash at 10pt?I'm struggling to get anything looking sharp and crisp even with style set to Readability.

View 1 Replies

Professional :: How To Use Faux Bold

Jan 5, 2011

I was given a fireworks png design that makes use of century gothic text with a faux bold applied. I can get a bold version of century gothic in flash, but this is thicker than the faux version. Can I force faux bold?

View 2 Replies

CS5 :: Can't Make A Textfield To Bold In It

Jun 24, 2011

I've got an FLA which was originally created using CS3, and i've got a dynamic textfield in it that uses font "Gadget".If i open the FLA in CS3, it gives me option to toggle the BOLD option, and when i compile it, the font appears to be bold in the compiled swf.

When I open the same FLA in CS5 (version 11.0.2.489),

---> I don't get any option to make the font bold on the same textfield,

---> and when i compile it, the text remain the same, it does not show as bold.

View 5 Replies

ActionScript 1/2 :: Can't Bold Text Why Not?

Aug 14, 2011

I've got a dynamic text field that I want to sometimes be bold, sometimes not. It's called "myTextField".I'm sending it a variable called "myText" and trying to bold it as follows:myTextField.text = "<B>" + myText + "</B>"

- The text field has the font embedded.

- I have some regular AND bold text in the text field in authoring

- The text field is set to receive HTML text in properties.

But it keeps putting "<B>" right in the text field before my variable and "</B>" after. What am I missing / not getting here?I know I've done this before, but can't find where.

View 6 Replies

ActionScript 2.0 :: Xml Bold - Let Li And B Working?

Mar 21, 2005

[Code]....

What do i need more for let li and b working?

View 3 Replies

Bold Font In Dynamic Text

Mar 17, 2009

i'm using a font called "AGBookBQ-Regular" in a dynamic text box, which loads a text file. i understand that to include the bold and italic options, i have placed another text box just out of view off the stage with these two options selected.italic works fine but the bold makes very little difference... it only stretches the font slightly.i've searched for the answer to make a much bolder font and it seems you can use a specific bold font as the bold font.i've tried this, but nothing happens. i think i'm interpreting it correctly, but if someone could please confirm this works and perhaps explain it a little clearer (using my specific font names... "AGBookBQ-Regular" and "AGBookBQ-Medium" as the bold font).

View 2 Replies

ActionScript 2.0 :: Bold Font In CDATA?

Mar 26, 2009

why this code in my xml

Code:

<![CDATA[<font color="#00000"><b>action</b>. </font>]]>

Is not making the dynamic flash content bold?If I use <u></u> it underlines it, but bold doesnt seem to work!

View 2 Replies

CS4: Make _Sans Font Bold?

Sep 30, 2009

Where's 'CS4' as a prefix to the post title? Anyway. I'm using _sans font for my flash work, because i want the font to display as the default _sans font on the device/platform. Why in CS4 (not checked earlier versions, but im sure CS3 didnt do this) is the (font) 'Style' drop down greyed out?

View 2 Replies

AS2 ::Making A Dynamic Text Box Bold?

Aug 24, 2010

lets say theres a dynamic textbox with the name 'txt1'

i typed the code:
txt1.bold = true;

but it doesnt work, the text is still not bold,

View 1 Replies

ActionScript 3.0 :: Do Home_btn In Bold When Click

Dec 3, 2008

I am creating a website in flash and have made a button based on a text string (e.g a "Home" button) when user click this button I want to make the text "Home" in bold" so the user can se where he is on the page How can I do this in Actionscript 3 I have tried using the button method "home_btn.setStyle(..)" and a lot of other things but I can't seem to get it to work.

View 2 Replies







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