Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




How To Support Superscript,subscript Formats In Dynamic Textfield In Flashmx2004 ?



Hi All,

How to support superscript,subscript formats in Dynamic textfield using Actionscript in Flash MX 2004?

Is there any tricky code to implement superscript and subscript at run time?

Thanks,



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-25-2004, 11:07 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Support Superscript,subscript Formats In Dynamic Textfield In Flashmx2004 ?
Hi All,

How to support superscript,subscript formats in Dynamic textfield using Actionscript in Flash MX 2004?

Is there any tricky code to implement superscript and subscript at run time?

Thanks,

Subscript And Superscript In Textfield
hai to all,

i am a macromedia director developer . atpresent i am learning the flash actionscript. i am very happy to join in ultrashock. it helps me to develop a flash developer.

i want to set superscript and superscript in dynamic textfield at runtime. actually i tried to set sub ans sup using htmltext options. but it doesn't set. anybody knows how to set. please help me. thanks in advance.

Subscript & Superscript In Dynamic And Input Text Field In Flash
I want just 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 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>";

They are better than CG since it goes lower than the baseline and it's real subscript..

Subscript & Superscript In Dynamic And Input Text Field In Flash
I want just 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 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>";

They are better than CG since it goes lower than the baseline and it's real subscript..

Subscript And Superscript Fail In Dynamic And Input Text Fields
I cannot enter subscript or superscript text in dynamic and input text fields.

how can i do this if it should be validated by keying in input textfields.

Subscript & Superscript In Dynamic And Input Text Field In Flash
Yes, <sub> & <sup> tags are not supported by Flash... 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>";

They are better than CG since it goes lower than the baseline and it's real subscript..

Superscript Subscript
Hi all techies...

I have to display superscript and subscript text in dynamic text fields using html <sup> and <sub> tags.
Is there any method to acheive it . Its urgent.

In some blogs o have read that making smaller font and vertical offset we can acheive dis. Can any one please help me wat needs to be done.

Thanx in advance

Superscript And Subscript
We are also having some questions on superscript and subscript. We are trying to implment the superscript and subscript for the dynamic text in a text area. We have tried even with antialaising and still the super script is not visible properly. Can we have some source code on how we can implement this.

Best regards,
Vijay

Superscript And Subscript
Anyone know how to make superscript and subscript show up in dynamic text fields that have .txt file load the text externally? They just show up as squares when I view them.

Superscript/Subscript With AS1.0/2.0
Hi everyone,

Does anyone out there know how to apply superscript or subscript to a dynamic textfield using AS1.0 or AS2.0? I tried looking for an example code but couldn't find any.

Thanks in advance.

regards,
Mike

[MX04] Superscript Subscript
Hi buddies,
As u all know very well dat we can mak any string/char which is in a static text field, to be superscript or subscript by applying from the property inpector panel.

Is there any other way to acheive the same to a string/char which is applied to an dynamic text field... where the text for dat field is dynamic.... thru code...

Can we acheive thru the html tag <sup> & <sub>

Its urgent.. please any one know dat let me know

thanx in advance

How To Write Subscript & Superscript Dynamically
I have a problem. I am generating text from the text file into the swf. How do i display subscript and superscript text in it. one way i guesss is usinh HTML text box, but have tried it with <SUB> and <SUP> tags, but it does not work.

Also, i know i am being stupid but is there a way we can input superscript and subscript in input text field.

Thankz in advance,
Abhishek

[MX04] Pbm With Superscript And Subscript Text
Hi buddies,

I jus have to display some text which having superscript and subscript values inside dat. I wanna display the text in a dynamic text field. How can i do dat.

If it is a Static Text, i know how to.... But the text content are dynamic. So need it dynamically....

Note : The htmlText doesnt support <sub> and <sup> html tags it seems. Else i cud use dat.

Its urgent. Any other alternate solution will be greately welcome....

[MX04] Pbm With Superscript And Subscript Text
Hi buddies,

I jus have to display some text which having superscript and subscript values inside dat. I wanna display the text in a dynamic text field. How can i do dat.

If it is a Static Text, i know how to.... But the text content are dynamic. So need it dynamically....

Note : The htmlText doesnt support <sub> and <sup> html tags it seems. Else i cud use dat.

Its urgent. Any other alternate solution will be greately welcome....

Superscript In Textfield
hi,
is there any way to make a text appear in superscript format in htmltext box in flashMx.

Superscript In TextField
Is there any way of raising a character in a textField programmatically to appear like an exponent?

Multiples Formats To A Textfield
Hi!
I´m having troubles asigning multiple formats to a text of a textfield.
Here is the code. (I´m sure it isn´t a font embeding problem)


ActionScript Code:
this.createTextField("tf1_txt",1,20,20,200,100);
this.tf1_txt.autoSize=false;
this.tf1_txt.border=true;
this.tf1_txt.borderColor=0x888888;
var textformat=new TextFormat("FFF Alaska", 8, 0x000000, true)
 
 
this.tf1_txt.multiline=true
this.tf1_txt.wordWrap=true;
this.tf1_txt.selectable=false;
this.tf1_txt.text="This is a Product"
this.tf1_txt.setTextFormat(textformat);
 
var textformat1=new TextFormat("FFF Alaska", 10, 0x669999, false)
textformat1.url="/photo1.html"
textformat1.target="_blank"
var snro=this.tf1_txt.length;
this.tf1_txt.text+="
Photo"
this.tf1_txt.setTextFormat(snro, this.tf1_txt.length, textFormat1);
delete(snro)
 
var textformat2=new TextFormat("FFF Alaska", 10, 0x999999, false)
var snro=this.tf1_txt.length+1;
this.tf1_txt.text+="
This is the product description"
this.tf1_txt.setTextFormat(snro, this.tf1_txt.length, textFormat2);
delete(snro)


some help plz...
thanks a lot,
Polaco

HELP Dynamic Subscript?
I'd like to display subscript (H20) in dynamic text. How can I do this? Thanks in advance!!

Dynamic Text & SubScript
Does ANYONE know how to get Flash to display Super and Sub script text in a Dynamic HTML formated Text box? The SUP tag doesn't work and I NEED to find a way to do this.

Thanks in Advance

Frequent-C
http://www.Freq-Fest.com

Using Subscript With Dynamic Text
i am pulling in text with remoting from xml documents. i have a subscript character that i was hoping would work in flash. the xml uses cdata. i was able to clean up other characters (&reg;, &) with the split and join in flash however i am not sure what is possible with the <sub></sub> tag. i saw that flash supports a character position but it is only available to static text. so ...is this even possible?

thanks for any help!

Can I Use Subscript In Dynamic Text?
Is there a way to load subscript and superscript text with XML?
If not, is there another option?

Using Subscript With Dynamic Text
i am pulling in text with remoting from xml documents. i have a subscript character that i was hoping would work in flash. the xml uses cdata. i was able to clean up other characters (&reg;, &) with the split and join in flash however i am not sure what is possible with the <sub></sub> tag. i saw that flash supports a character position but it is only available to static text. so ...is this even possible?

thanks for any help!

<li> Support In Textfield
Hi,

I've just been reading that flash supports the li tag. It does seem to put a bullet point in front but doesn't pick up on any of the css I have like:

li{ font-family:Arial; }

Is this just more dire html/css support from flash or do I have to do something else?

Thanks,

Greg

Dynamic Text And Superscript
HI all,

I'm trying to get superscript for numbers to work using the unicodes of the font.
Anyone know of a hack to achieve this ?

I managed to get it to work with unicodes and if i create a dynamic textfield and within flash specify the characters i want to embed and then did this:
myText.html= "testing /u2074";
off the top of my head /u2074 will display 2 in superscript.

The font i'm using is palatino which has all the superscript codes for numbers 1-9.

The problem is i need to read the text from an external xml file. I've put the text i want in cdata so /u2074 will be read.

I'm reading the node with the cdata into myText.html and what it displays is:
testing /u2074 instead of testing 2.(that 2 should be superscript)

Anyone have any ideas or managed to achieve this ?

TextField HTML Support
I am developing a flash application that returns html text to a textField object. The returned text is a list of names.

I have recently added search functionality to this application, and would like to be able to highlight the searched name within a page of non-highlighted names.

I have been trying to work with css to see if I can find a way to make this happen, but have been unsuccessful to this point. Here is the html code that I know will do what I want:

<font style:background-color:#000000>FirstName LastName</font>

Is there any way to get this effect in flash?

Thanks,
Ron

Superscript And Subscrupt In Dynamic Text Field
Hi i want to load a text from an xml in a dynamic text field. The speicified texts has some html tags......
I jus want to know how we can display superscript or subscript in dynamic text fields. Since html's <sub> & <sup> tag s not suppoerted by DYnamic text field even though u make it as htmlText.
I jus want to know is there any mehod out for acheiving the same... if not y the specified tag is not supported.....
Is der any other way to do dat....

Help me please. Its urgent...

Superscript Fonts In Dynamic Text Fields?
Does anyone know of a way to create superscipt number, or to hack it in dynamic text fields? I'm using XML along w/ a number of CSS styles and I can't find a way to achieve this.

One option would be a nice small pixel font thats designed to looked like superscript numerals - so if anyone knows of something like this, let me know, thanks!

creatify

Superscript Font For Dynamic Html Text Field
Hello Forum

I am loading in a bunch of text and format them in flash into a newspaper-like layout.

The problem I am running into and can't seem to solve are superscript characters. I've used the GG superscript fonts from this website: http://blog.ggshow.com/index.php/reference?cat=121

Tthe example works fine. But once I try to implement it into my application it fails to work or simply doesn't show up.

Here's my code:


--------------------------------------------
External XML file:
--------------------------------------------
[...]
<item type="text"><![CDATA[.This is a sample text <i>Italic Font here shows up right</i><font face="GG Superscript">superscript here doesn't work</font>, ]]>
</item>
</p>
[...]



--------------------------------------------
Reading the Texfield:
--------------------------------------------
[...]
public static function getNodeContent(_xml:XML):String{
return String(_xml.firstChild.nodeValue);
}
[...]

--------------------------------------------------
creating the textfield:
--------------------------------------------------
txtHolder = itemMC.createEmptyMovieClip("txt",1);
Textfield.create(txtHolder,XmlArticleData.getNodeContent(itemNode),"articleText")



--------------------------------------------------
The Textfield class:
-------------------------------------------------
public static function create(_movieClip:MovieClip,_str:String,_type:String){
switch (_type) {
case "articleText":

_movieClip.createTextField("txtMC", 1, 0,0, 1, 1);
_movieClip.txtMC.autoSize = "left";
_movieClip.txtMC.type = "dynamic";
_movieClip.txtMC.border = false;
_movieClip.txtMC.multiline = true;
_movieClip.txtMC.html = true;
_movieClip.txtMC.embedFonts = true;
_movieClip.txtMC.selectable = false;
_movieClip.txtMC.wordWrap = true;
_movieClip.txtMC.antiAliasType = "advanced";
_movieClip.txtMC.thickness = 1.2;
_movieClip.txtMC.sharpness = 0;


var fmt:TextFormat = new TextFormat();
fmt.font = "ArticleTextFont";
fmt.indent = 10;
fmt.bold = false;
fmt.italic = false;
fmt.size = 11.5;
fmt.leading = 10;
fmt.color = 0x000000;
fmt.align = "justify";
}
_movieClip.txtMC.htmlText = _str;
_movieClip.txtMC.setTextFormat(fmt);



-----------------------------------------------------------

Any ideas?

Thanks!

Cheers

StephanK

Multiple Formats In Dynamic Text
Hi, everyone. I have a question about text formating that I'm sure someone can answer for me.

I'm pulling an array from a MySQL database that is updated via a runtime on the systems of my content providers to keep them from mucking up the site

The script as it stands, pulls the Title, Client, and Description of each piece, newest to oldest, from the array and plops them out with some line breaks to make it look readable.

Currently, all the strings are placed via += into the same text field, which is then scrollable using the standard ScrollBar UI Component.

See the working model here.

What I'd like to do is to format the title such that it is a bit bigger, and a different font, bold. Format the client so it's light gray and small, and the text as something more uniformly readable. Not too hard with static text, a big harder than I expected dynamically.

I read up on TextFormat objects, but the only way I can see to implement this in a scrollbar is to use one dynamic text field -- and the only method I can see of dynamically using multiple text styles in one field is to designate the start and stop points of the style change as character numbers.

The whole point of using flash rather than PHP to display this on the page was centered around text formatting and scrollability. I have half the mission complete, but just can't seem to get ahold of this text problem.

Any solutions? Is using one text field the best idea or should I be dynamically creating fields in a movie clip and then scroll the whole clip?

Thanks a bunch.

- Aiden

Alignment Of Image In Dynamic Text Box FlashMX2004
Hi

I have a dynamic text box in with HTML set to true. I am calling the image path from an external (.txt) file. The problem is when i set the variable in this way " &var=Hi <img src='myimg.jpg'>this is my image. " into the txt file and test my movie. It shows
"Hi this is my text in the same line and the image below the text".

Can anyone help me in aligning the image with the text

Thanks

How To Set My Dynamic Text Box Can Support UTF-8
i used flash call variable of word chinese or japanese word from html , the dynamic text field can display word from param variable.
but i used javascript to send Chinese, Japanese word to flash, the dynamic text cannot display the word. any expert who know about make dynamic text box support UTF-8 , can give some suggestion?

Dynamic Text Loading Support
Hi all I just have a few questions, I have a flash site that loads html pages into the site, this works fine but I had some problems,

Firstly Bold & Italic don’t seem to work. Underline and other formats work fine. I not fussed about Italic but I could do with Bold, I have tried strong also any know what the problem could be?

The & symbol seem to stop/end the text from loading, any one know why? (this isn’t really a big problem but it there is a solution I would be grateful.

Finally the Pound sign £ and euro sign € wont display, why?

so if any can help it would really help.

Many thanks.

Dynamic Text - Character Support ?
I'm getting dynamic text texts from external XML.
Language is turkish.

The turkish characters are not displayed properly.

What do I have to do, to get them displayed properly ?

Chinese Font Support In Dynamic Fields In CS3
Hi
I understand that in pre-CS3 Flash you had to embed the entire Chinese character set in EACH dynamic text field you wanted to use it in, blowing out the size of the FLA. I have a site where I want Chinese or English text to appear in dynamic fields based on a user's region - is CS3 better at this?

cheers

Textfield Woes, How To Anti-Alias A Dynamic Textfield?
this is driving me nuts, even if i have it marked so that my dynamic textfield is anti aliased, it still looks as if its text is aliased. And if i simply make that textfield Static, the text all of a sudden looks amazingly crisp and anti aliased.

How can i fix this?! I am attempting to load xml data into my text fields but its wasted if the text looks like crap..

So can anyone enlighten me on how to do this? i tried searching Flashs help, all i came out with was "Textfield._quality" but i do not understand what the description means exactly.. And i tried coding my textfield to _quality = "BEST";, with no avail.

Please help, i'v seen other websites with what i am sure is dynamically loaded fields, and smooth looking text... so what gives?

Thanks!

Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

[F8] Dynamic Text Scroll Ticker Html Support
Hello, I've done a scrolling ticker, with external text file support, but I cannot insert HTML tags in it. If I put html support, the text doesn't scroll. Please help me! I really need to know how to scroll that text with HTML support. I attach the source of the files.

Thank you in anticipation!

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help

[F8] Input Textfield Inside A Dynamic Textfield?
Hi,

Is it possible to place an input textfield inside a dynamic textfield?

I'd like to replace the variable, this.nTotal, below with an input textfield.
Is there some way to do this?

this.txtComplete.text = "There are " + this.nTotal + " pages in " + this.sGirlName + "'s book.";

Thanks!

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Multiple Text Formats In Dynamic Text Box
inside a scrolling text box i want to have multiple text formats. i.e the text in the text box is a bunch of quotes.

"band to watch"
-ALTERNATIVE PRESS

i would like to have the top text to be regular and the bottom line be bold and italicized. It appears as though it will work but then when i publish it the bottom line is just caps.

is this possible?

Multiple Text Formats In Dynamic Text Box
inside a scrolling text box i want to have multiple text formats. i.e the text in the text box is a bunch of quotes.

"band to watch"
-ALTERNATIVE PRESS

i would like to have the top text to be regular and the bottom line be bold and italicized. It appears as though it will work but then when i publish it the bottom line is just caps.

is this possible?

Subscript In Flash
Okay I have a horrible feeling this isnt going to be possible....

I'm importing text from an xml file, but it could just as easily be a text file I suppose. anyway the text is then put into a dynamic text field set to HTML formatting, unfortunately I need it to display subscript and superscript characters. Which if I just use normal html tags <sub></sub> it just displays these in the tex box.

Anyone have any ideas on this?

Thanks, Andy.

Subscript Text
I am once again faced with a problem I had a year ago and am hoping someone can help me. I am trying to have it so that a user can type a subscript into a dynamic text field. I posted this thread a while back.

Subscript

The solution never really came out of this thread (at least that I could tell) and I had to move onto other things....but the demon has returned.
I have given up on superscript for now, but would just like it so that a user can hold down a key, and the font size reduces in the dynamic text field...then returns to original size when key is let go. It is for entering molecular formulas like H2O (but the 2 is smaller and set down a bit). At this point I think I can achieve the desired effect by just having the numerical value be reduced in size. Any suggestions?
thanks,
skee

Subscript Numbers
I'm trying to display chemical compounds (e.g H₂SO₄) in a flash html text field by importing CDATA from an xml file.

However when flash displays the text it displays like this, H₂ SO₄ - essentially it leaves a gap after the subscript text.

I'm using ASCI codes for the 2 and the 4 as subscript doesn't work in flash. As you can see in html displays just fine. Does anybody have a solution for this?

Kind regards,

Luke

Copyright © 2005-08 www.BigResource.com, All rights reserved