PDA

View Full Version : Dynamic text


zai
04-18-2002, 01:04 PM
I got 2 problem with the dynamic text.
First: is it possible to have superscript and subscript text?
Second : Addressing problem. A mainframe mc loadMovie mc1 and mc2 . Mc1 want's to change the dynamic text in mc2a in mc2.
mc2 tree: mc2->mc2a->text
I tried in mc1: _root.mainframe.mc2.mc2a.text;
_root.mainframe.mc2.text;
but cannot work!
Please, somebody help me.
Thanks in advance.

sfa
04-18-2002, 01:35 PM
first: As far as i know there is no actionsctipt for subscript and superscript(maybe you can use html content)
seconf: try - _root.mc2.mc2a.text

SFA

pinkaboo
04-18-2002, 03:13 PM
not totally relevant as you ask about dynamic text and you probably know this already but just in case...
superscript and subscript are options on the character panel.
They are in the dropdown menu above the url field, the menu with the big A and the little A with the arrow next to it.
BUT they aren't available with dynamic text, only static text - booooo!
K
whooo hoo 500 posts :) now time for a snooze I think

zai
04-18-2002, 03:57 PM
Hello sfa, I tried to use your method but still doesn't work.
I forgot to add in that the instance name of the loadmovie dropzone for mc2 is mc2.(same name).
But strange, this script : mc2.gotoAndPlay(2); works, so can't figure out the problem. I also check that the instance name are correct. Got any idea ??
By the way, I want to use subscript and superscript in dynamic tx because my movie need to calculate and output equations with powers. Actionscript variables can't store that ! Is there any way where I can output those equations ?
Your help is greatly appreciated.

sfa
04-18-2002, 04:18 PM
if I understood correctly try - _root.mc2.mc2.mc2a.text .

About the other problem, the only way I can think of is extremely complicated to do and not 100% perfect. You can try checking the character size of the font you are using and place teh powers in other mc that are placed in the correct place but i wouldnt go into that. Cant you use 5 pow 2 :) ????

SFA

savil76
07-22-2008, 11:38 PM
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 :( 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.