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 ?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-04-2006, 11:13 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
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 & 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..
External Text In Superscript---how?
12
i am trying to have superscript in external text. i checked the available tags, and i found that <sup> cannot be read by flash player. so what should i do?? anybody helps?? thanks you soooooo much!
[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....
Flash8: Hyperlinking Superscript Text
In Flash8, has anyone tried hyperlinking text that has been formatted as superscript ?
When hyperlinked, the superscript disappears and it reverts to normal text.
Can someone please show me how to hyperlink superscript text while retaining the superscript.
Thanks in advance.
Superscript
Does anybody know how to make superscript on dynamic text in flash?
Like this: <b>Areal</b><br>2.184.700 km2<br>
Only I need some of the text to be superscript instead of bold...
Thanks in advance =)
Superscript
Anyone know how to install, if its even possible, superscripted numbers within dynamic text boxes?
ex: 10 to the 8th....
Many thanks in advance!
XML And Superscript?
Hi all.
I am creating a slideshow in Flash, following the tutorial here: http://www.kirupa.com/developer/mx2004/xml_slideshow.htm. My movie inports an xml file which has a list of photos (fine), each with an annotation.
In one of the annotations, I have a French MC: the French version of TM so it needs to be superscript. I haven't been able to figure out how to make the MC superscript.
Thoughts?
Thanks
Superscript
Is there any way to dynamicaly set the text to superscript?
I have dynamic text box that usualy holds normal text, but I would like to place ® and © symbols when used, to superscript?
Is there any way to do this in some easy way?
Superscript With Generator
Hi,
I am working on a project that requires generator to take external text files and convert them to swf files. The problem is that the text files incoude many superscript letters. So far it hasn't been able to.
Any suggestions or thoughts on this would be appreciated.
Best,
Wantan Soup
The Sub/superscript Revisited
ok, adobe sez: http://www.adobe.com/cfusion/knowled...fm?id=1959eceb
but if you code:
Code:
my_tf.htmltext="COu2080"
you'll get the correct CO2 symbol
also for example e=mcu2070 works.
now this only works when the font is not embedded...
when you embed fonts, the sub or superscript symbols vanish...
even when you code:
Code:
my_tf.htmltext="CO<font face='Arial'>u2080</font>"
does anyone have an idea for a workaround ?
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
Typing Superscript In AS2
hey guys, I wanna display area units through a dynamic text box , but the only way I know to show it is by using ^ operator, eg in^2 .. how can I display it like we write it by superscripting the 2?
Edited: 06/11/2007 at 04:03:51 PM by thunder_storm
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 In TextField
Is there any way of raising a character in a textField programmatically to appear like an exponent?
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
LoadVariables --- (parts In Superscript)
i have this problem when loading a txt variable
html superscript is
Code:
<sup>value</sup>
and i stuck that in the text file...
my usual technique for making text bold etc, but i have'nt found a way to superscript, or subscript txt yet, it keeps the number or whatever the same size as the rest of the text.
i can get 1,2,3 in superscript with a hex value, but thats about it and i need numbers like 20, 30.
Is anyone able to help me out please? im stuck.
Matt
thanks
[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
Add A Style That Mimicks Superscript?
Any suggestions on how I can add a style in flash that mimics superscript since that's a tag it won't support?
I'm pulling in the content from an xml file:
<?xml version="1.0" encode="UTF-8"?>
<!DOCTYPE data[
<!ELEMENT daTextBox(daTitle, daContent)>
<!ATTLIST daTextBox daTitle CDATA #REQUIRED>
<!ELEMENT daContent (#PCDATA)>
]>
<daTextBox>
<daTitle><p class="title">Here is the title</p></daTitle>
<daContent><p class="content">Wow. I would love to have this be a superscript 2</p></daContent>
</daTextBox>
Displaying Superscript Characters
Hey all
I'm using an FFF pixel font which contains 1,2 and 3 in superscript characters.
The thing is - how do I display these characters in a dynamic html text box?
Thanks
Xml Entities Like Superscript Won't Show Up
Can someone help with xml entities showing up.
I have file that imports external xml, but can't get the supscript to work, nor most xml entities.
I found a workaround for italic and bold (<i>word</i> but not for others like <sub>
Would appreciate any help on this matter.
Thanks.
Custom Superscript Font
Just curious if anyone has created a custom superscript font to use dynamically in flash - for Mac? I know I can get superscript 1,2,3 via unicode, but I need the full set 0-9. I'd like to avoid purchasing a font app and would be happy to pay for the set if someone had them.
Xml & Trademark Symbol (superscript)
I'm pulling in some text from an xml file, however I am also listing some company names that need to have the trademark symbol next to them (preferably as a superscript). I know the html for it is ™ but even when I make the text box read as html it doesn't parse through correctly. Any ideas on how to do this?
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.
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
Can Flash Read Superscript Tags In Xml Please Help
How can I Import a superscripted 3 in xml to a dianiamic text box in flash? I have tried two ways to format my xml so flash would recongize my 3 as superscript. Is this possible? I tried rendering my text box as html also that didnt work.
my xml code is below neither one has work for the import.
<answer2 correct="false" txt="39 x 10^3/ul" /> ^3thought it would render that as html
<answer2 correct="false" txt="39 x 10²/ul" /> used this code & #178 ;
How can i format my xml so flash will render it as superscript
Create A Superscript Test *within* A Tooltip
'Sup guys,
I'm in need of some urgent help, I know how to use the superscript in simple dynamic/input fields, but I have this script of a tooltip and I'm unable to write superscript text within the bubble!
I've included the .html and .htmlText properties in the text field script but with no use, please guys help me out FAST and I'm willing to reward anyone that helps (I have a free copy of Day of Defeat Source that I'm willing to part with if someone here give me the solution!)
I've included the .fla file and here's the script for the tooltip:
Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.register(PennerEasing,FuseItem,FuseFMP);
var tipFormat:TextFormat = new TextFormat();
tipFormat.font = "Verdana";
tipFormat.size = 11;
tipFormat.color = 0x000;
var blankTip = " ";
this.createEmptyMovieClip("tiptool",this.getNextHighestDepth());
tiptool.createTextField("tip",3,0,0,100,100);
tiptool.tip.html = true;
tiptool.tip.htmlText = true;
tiptool.tip.wordWrap = false;
tiptool.tip.multiline = false;
tiptool.tip.autoSize = true;
tiptool.tip.embedFonts = true;
tiptool.tip.selectable = false;
FuseFMP.setFilterProps(tiptool,'DropShadow',{distance:0, alpha:.5, blurY:10, blurX:10});
tiptool.onEnterFrame = function() {
this.createEmptyMovieClip("box",1);
this.box.beginFill(0xFFFFFF,100);
this.box.lineStyle(1,0xFFFFFF,100);
this.box.moveTo(-10,-10);
this.box.lineTo(this.tip._width + 10,-10);
this.box.lineTo(this.tip._width + 10,this.tip._height + 10);
this.box.lineTo(-10,this.tip._height + 10);
this.box.moveTo(-10,-10);
this.box.endFill();
this.createEmptyMovieClip("pointer",0);
this.pointer.beginFill(0xFFFFFF,100);
this.pointer.lineStyle(1,0xFFFFFF,100);
var boxXedge = this._x + (this._width - 20);
if (this._parent._xmouse < Stage.width / 2) {
this.pointer.moveTo(0,this.box._height - 11);
this.pointer.lineTo(this._xmouse,this._ymouse);
this.pointer.lineTo(20,this.box._height - 11);
this.pointer.endFill();
this._x -= Math.round(((this._x) - (this._parent._xmouse)) / 7);
this._y -= Math.round(((this._y) - (this._parent._ymouse - 40)) / 7);
} else {
this.pointer.moveTo((this.box._width - 20),this.box._height - 11);
this.pointer.lineTo(this._xmouse,this._ymouse);
this.pointer.lineTo((this.box._width - 40),this.box._height - 11);
this.pointer.endFill();
this._x -= Math.round(((this._x) - (this._parent._xmouse - (this.box._width - 20))) / 7);
this._y -= Math.round(((this._y) - (this._parent._ymouse - 40)) / 7);
}
};
/*-----------------------------------------------------------------
Tip Show/Hide Function
-----------------------------------------------------------------*/
function showTip(txt,flip) {
tiptool.tip.text = txt;
tiptool.tip.setTextFormat(tipFormat);
tiptool._visible = flip;
ZigoEngine.doTween({target:tiptool,start_rotation:45,start_scale:0,time:1,ease:"easeOutElastic"});
if(flip){
clickSound.start();
}
}
showTip(blankTip,false);
/*-----------------------------------------------------------------
Button Functions
-----------------------------------------------------------------*/
btn1.onRollOver = function(){
showTip("Quit",true);
}
btn1.onRollOut = function(){
showTip(blankTip,false);
}
btn2.onRollOver = function(){
showTip("Contact Us",true);
}
btn2.onRollOut = function(){
showTip(blankTip,false);
}
btn3.onRollOver = function(){
showTip("About Us",true);
}
btn3.onRollOut = function(){
showTip(blankTip,false);
}
btn4.onRollOver = function(){
showTip("Home",true);
}
btn4.onRollOut = function(){
showTip(blankTip,false);
}
Thanks in advance,
Jumping To Areas Of Dynamic Text, Printing Dynamic Text
hello,
I have a movie clip that loads a .txt file into a dynamic text field. Due to the amount of content in the file a scroller bar is needed in order to view all of it. I want to create buttons that jump to different areas of the dynamic text for easier navigation so the user can go directly to various sections instead of having to use the scroller all the time. What kind of coding would I need to put on the buttons and within the .txt file at the areas I want to jump to?
Also, I would like to give the user the option to print everything within the dynamic text field only, not the surrounding elements in my movie clip. Is that possible?
thanks!
Dynamic Text Not Loading On Server . . . Other Dynamic Text Issues
ok - here's the url
http://www.rongilcreast.com/Test_Site/main.html
when I 'test movie' in Flash, the text comes in. But not now that it's online . . .
2nd problem. I want to add a scrollbar to the textbox, but when I drag the scrollbar onto the textbox, it doesn't snap-to the text box and resize itself.
all the files are here:
http://www.rongilcreast.com/Test_Site/main.fla
http://www.rongilcreast.com/Test_Site/main.swf
http://www.rongilcreast.com/Test_Site/Index.txt
whatamIdoin'wrong?
tia . . .
[AS2] Changing Text In Dynamic Text Field With Dynamic Instance Name
I dont know what I am missing here but what I want to do is change the text inside a dynamic text field via actionscript. the code I am using runs in a loop within a function. Trace is outputting the correct values.
PHP Code:
for(i=0; i<=4; i++) {
if(_root["order_"+ q][i] == 0) {
["order_"+ i]text = "First";
trace("first");
} else if (_root["order_"+ q][i] == 1) {
["order_"+ i]text = "Second";
trace("Second");
} else if (_root["order_"+ q][i] == 2) {
["order_"+ i]text = "Third";
trace("Third");
} else if (_root["order_"+ q][i] == 3) {
["order_"+ i]text = "Fourth";
trace("Fourth");
} else if (_root["order_"+ q][i] == 4) {
["order_"+ i]text = "Fifth";
trace("Fifth");
}
}
basically I want to do this -
PHP Code:
order_0.text = "First";
So how can I change this line to work as expected?
PHP Code:
["order_"+ i]text = "First";
EDIT- The instance names for the dynamic text fields are set
Thanks
Trying To Take The Text From One Dynamic Text Field And Populate Another Dynamic Text
I'm trying to take the text from one dynamic text field and populate another dynamic text field with its contents.
I want to display the text that is in the text field _root.MC_Control.tab_title in another text field called _root.video_title.
I have tried this:
_root.video_title.text = _root.MC_Control.tab_title.text;
and this:
_root.video_title.text == _root.MC_Control.tab_title.text;
neither one seems work....am I missing something?
Asfunction - How To Load Dynamic Text With Dynamic Text? [F8]
Hello dear helpers !!!
I'm trying to get external, dynamically loaded text to load different text files into a text box. I've figured out that I need asfunction to do it through calling a function in the movie and passing it variables, although i haven't been able to write this function at all... would anyone mind giving me a hand???
thanks sooo much!!
p.s. I've managed to get this working by creating a toggle function, so at the moment I have 25 text boxes and a show/ hide function, but that's very buggy.
Loaded Text File Wont Show All Of The Text In Dynamic Text Field
When I load an external text file into flash and display the string in a dynamic text box, not all of the text will show in the text box; and using scroll button to scroll the text doesnt help.
The text that is in the text file is as follows, and as far as I can see there is no reason why all this text shouldnt show in the dynamic text field; by the way all my targets are correct, I know that for fact.
message=Code: Cheat:
BEEPSAGONER Deactivate the censor beeps
DRACULASTEABAGS 50 lives
DUTCHOVENS Frying pan mode
XFYHIJERPWAL IELWZS Debug mode
BOVRILBULLETHOLE Shoot all objects
EASY Easy mode
VERYEASY Very easy mode
SPUNKJOCKEY New death animation
SEXYMANN Birdy & Squirrel scene
Code: Unlock chapter:
PRINCEALBERT Barn Boys
CLAMPIRATE Bats Tower
ANCHOVYBAY Slopranos
MONKEYSCHIN Uga Buga
SPANIELSEARS Spooky
BEELZEBUBSBUM It's War
CHOCOLATESTARFISH The Heist
WELDERSBENCH All chapters and scenes
Code: Unlock Multiplayer character:
WELLYTOP Conker
EASTEREGGSRUS Neo Conker
BILLYMILLROUNDABOUT Gregg the Grim Reaper
CHINDITVICTORY Weasel Henchmen
EATBOX Cavemen
RUSTYSHERIFFSBADGE Sergeant and Tediz Leader
BEEFCURTAINS Zombies and Villagers
Trasfering Text From One Dynamic Text Box To A Input Text Box On A Differnt Page?
Ok so I have a text box set up which receives the date on a callendar which you click on. On another page (a seperate html file) I have an input text box for receiveing this text.
I've been trying to do this using various methods using getURL, but, I can't get it to work. This is becoming tedious especially as I'm not able to test it without having to reupload the files.
If someone could please inform me on how I should do this I'd be vary greatful.
If you need any further information I'll reply as soon as possible.
|