Welcome to Dream.In.Code
Getting Help is Easy!

Join 118,587 Programmers for FREE! Ask your question and get quick answers from experts. There are 819 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



font size in a dynamic text box

 
Reply to this topicStart new topic

font size in a dynamic text box

chosen
post 28 Oct, 2006 - 01:15 PM
Post #1


New D.I.C Head

*
Joined: 24 Jul, 2006
Posts: 38


My Contributions


Hi! Is there someone that can give me guidance to change the font size or the position of a letter in a dynamic text box.

For instance I am trying to display some chemical equations
this.createTextField("my_txt",this.getNextHightest Depth(),
260,150,215,150);
my_txt.text="H2O";


I want the 2 in H2O to be a different font size so it can look like a subscript. Any suggestions???

I have tried using <font size=-4>2</font> but it doesn't work. I guess I need to somehow figure out how I can point to a particular character to resize it. Hope this makes sense.

Thanks
User is offlineProfile CardPM

Go to the top of the page


pioSko
post 27 Nov, 2006 - 07:08 AM
Post #2


still.dreaming

Group Icon
Joined: 6 Jun, 2003
Posts: 1,888



Thanked 2 times

Dream Kudos: 225
My Contributions


In a dynamic text box? Can't be done. Sorry.

Only option is to have each letter in a seperate text box
User is offlineProfile CardPM

Go to the top of the page

savil76
post 22 Jul, 2008 - 03:45 PM
Post #3


New D.I.C Head

*
Joined: 22 Jul, 2008
Posts: 1

I want to share with you the way I get may subscript and superscript inin dynamic and input text field in Flash:
<sub> & <sup> tags are not supported by Flash sad.gif but you can
use Subscript & Superscript in dynamic and input text field in Flash:

Download & install Subscript & Superscript fonts from http://www.subscriptfont.com or http://www.superscriptfont.com
You will need to restart Flash software after installed fonts.
Create a dynamic text field with Arial font embeded. Set the HTML property to true.
Create a dynamic text field with Subscript font embeded.
Create a dynamic text field with Superscript font embeded.
Use HTML tag to set text to subscript or superscript like below:
Some text<font face="Superscript\">©</font>
If you are using ActionScript to test the htmlText, use script like below:
my_txt.htmlText = "Some text<font face='Superscript'>TM</font>";
Data can come from a XML file, TEXT file or from flash itself.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/11/08 07:24PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month