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




Formatting Dynamic Text



I'm trying to design myself a Flash Blog, and I'm stuck on something really simple:I need to use a dynamic text field for my entries so people can scroll through it...but I'm not sure how you go about formatting any text that isn't static.Help?



Adobe > Flash General Discussion
Posted on: 07/17/2007 08:08:31 AM


View Complete Forum Thread with Replies

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

Loss Of Text Formatting When Using Dynamic Text Field & Scroller
Hi all,

Using MX...

Another small problemo im having is when i format text in my dynamic text field and attch the scroller component to it, in preview mode i lose all the text format and it goes to the first text format it encounters and uses that for everything else in the dynamic text box.

Im not actually loading any text into the dynamic text box, im just using it with static text, so i can use the scroller component.(as i understand it, you can only attach the scroller component to a dynamic text box ??)

Why am i losing my text format AND is there a better way to have a scrolling text field when i just want to use static text...???

Thanks guys..hope thats not too confusing

Cheers

Dynamic Text/scroll Bar Component Changing Text Formatting
I would apologise if this has been answered before but I have done a quick search & was unable to resolve it & I'm up against a dead line.

I have a dynamic text field onto which I have placed a scroll bar component problem I have got is that the dynamic field has now lost all of it's formating -the header was orginally slightly larger & of a different font.

Anyone please tell me how to resolve this.

Thanks

FORMATTING DYNAMIC TEXT
i'm creating a quote puller. it gets the quotes from a array and then places them into a dynamic text field. i'd like to be able to control the color (Damn the blue!) and the size. it's too small. maybe i could make the text bold?

any help would be styling.
thanks

Formatting Dynamic Text
Hi all

With the help of a FK member I recently put together some A.S which formats text in flash as programs like MS Word does.

Here's the link - only 3kb format text

Although this script works great first time over if you try to click 'bold' again or re-select part of the pre-formatted text then it throws up all sorts of problems.

Have a play, you'll see what I mean.

Any help would be greatly appreciated sorting this problem out.

Here's the .fla for you to get stuck in. (only 30kb)

Cheers

Dynamic Text Formatting...
I created a dynamic textbox with a scrollbar, but am unable to format the font inside except as all the same.

If I wanted certain words in italics, how would I go about this? I still would need the scroll feature.

Thanks!

Dynamic Text Formatting
I am calling up dynamic text from an external text file, the movie has to be flash4 compatible does this mean I cant use any weird symbols like TM signs, é, į, and all that? I know for later version you can call up HTML, but for Flash 4?

Please help me!

Dynamic Text Formatting
Okay, I have a dynamic text field that loads TXT files. I know formatting is only limited to Italics, Bold, Underlines, links and so on. But I cannot seem to get the FONT COLOR tag to work. Anyone have suggestions?

Dynamic Text Formatting
Hi,

I need to convert a static text box to a dynamic text box in order for the slider componant to work. However, this causes the text to 'look' different in terms of it weight.

Anyone know of any work arounds other than getting off my arse and manually building a scroll bar old stylie?

Cheers

Formatting Dynamic Text?
I'm curious as to how I might format text in a dynamic text box. The text changes, and I don't know how to add a return, etc.. example

_root.dynamtext = "I don't know how to format this text or add carriage returns, etc..";

Help Me With Formatting Dynamic Text
DEAR FLASH KIT PEEPS!

I am in desperate need of some assistance...

I am currently developing a site for my corporation and have ran into a majore stumbling block.

I understand dynamic text and have the scrollbar working with my dynamic text. unfortunately when I try to use "render as html" It still won't format and shows all the html tags in the window - and its still scrollable... if I remove my action script to load the text - I can no longer use the scrollbar but the text is formatted correctly... here is my action script to load the text and let the scrollbar work...

loadText = new loadVars();
loadText.load("captions.txt");
// creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.tapnglow;
};

That makes the text load and the scrollbar work... If remove that and just use loadvariable = captions.txt the scrollbar won't work but its formatted right...

I am tearing out my hair right now! any help anyone?!?! please!!!
you can even call me @ 800-878-3413 and ask for Jered!

I'll order you a pizza via pizzahut to you house right now!

PLEASE HELP

AHHHH!!!


Jered Brent

Dynamic Text Formatting
Hi,
I currently have an MC which contains a dynamic text field and happily pulls in text from an external .txt file using the loadVariables action. It also appears as the correct font style size etc that I have designated in the Character panel, which is great.

However, once the text has been pulled in, I want certain parts to be formatted in different ways:

eg. some words need to be different colours, others need to be bold or italic etc.
I also want part of the text to act as a GET URL mailto: link.

How can achieve this?

Thanks
Elastik.

Formatting Dynamic Text
Hi.

I'm trying to format a bulletpointed list using an html textfield. Some of the points contain more than one line, so I'm trying to align them two spaces in from the left hand side..

nbsp; will not work, neither will regular spaces.. I did use a tab after the bullets, and on the new line - this worked fine, but my client thinks there is too much space between the bullet and text. Does anyone know of a workaround for this? Any special characters or suchlike that can be used?

ta.

Formatting In Dynamic Text Box?
Is it possible to format text in a dynamic text box in flash or do I have to have formatted html text load?

Formatting Dynamic Text
Ok, i wanna know if i'm right.

You can load text into textfields (dynamic). If it's loaded dynamically and you need some extra format (some words must be bold, others italic, etc), you must render the text as html and use html tags for formating...if you do that, you can't embed the font or it won't work, so basically u depend on the font installed in the client (so u should use arial, helvetica or verdana).....this kind of text cannot be masked or it won't work.

Optionally you could use the textFormat object, but that way you'll format the entire textfield.....

so basically u lose the advantage of using embedding fonts when working with some text formatting (like for example when you need links inside the text) as you have to use plain html, and even use the deprecated font tag, and got no css support. So you get limited to use arial helvetica or verdana.......

Is that right, or am i missing something?

Formatting A Dynamic Text Box
I need to have a dynamic text box that feeds from varibles being passed round the movie. At the moment I have 2 different text boxes, one with the title number and one with the title name. The title number is a bigger font. What I need to happen is for it all to be in the same dynamic text box but have the first two characters (title number) bigger.

does anyone know how to do this.


Thanks
Kaan.

Formatting A Dynamic Text Box
I need to have a dynamic text box that feeds from varibles being passed round the movie. At the moment I have 2 different text boxes, one with the title number and one with the title name. The title number is a bigger font.

What I need to happen is for it all to be in the same dynamic text box but have the first two characters (title number) bigger.
- it cant be an external file just variables.

does anyone know how to do this.


Thanks
Kaan.

Formatting Dynamic Text
Hey ya'll

Is there a way to format dynamic text. Can you use HTML tags in a text doc.?

Dynamic Text Formatting
Hey-
how do i get a question mark to show up in my dynamically loaded text file?

I think the ? symbol may be a reserved character for some reason, so everyhting i have beofre the question mark doesnt show up.

help?

-myk

Formatting Dynamic Text
Should be simple, surely?
I've made a dynamic text field and added a scroll bar. I'd like to change the appearance of the text - namely embolden and add bullets.
Any suggestions, please?

Formatting Dynamic Text
Hi. I am interested to know how others format dynamic text i.e. a long piece of text in a website that has a scroll on it. The objective is to use have different colours, heading sizes, spacing, kerning etc....all the things you use to make text pretty.

So far I have been loading a text file with html formatting...not very friendly (or flexible)...anyone do something different...maybe xml? Love to see some examples of what people are doing...??

Formatting Dynamic Text
I'm loading dynamic text from an external file at run time and I'd like to be able to format the text b/c by default the line spacing is really large. I tried the format button in the properties panel and reduced the line spacing to 0 pt but this had not effect. Can I do it with HTML in the external file? Other ideas? Thanks.

Formatting Dynamic Text
Why on earth can't I format dynamic text?? When I format it (simply bolding/italicizing/changing font size/etc) it shows up in the textbox but remains only in one format when I view the swf file...what's wrong with this?!?

Please help!

Dynamic Text Formatting
Hi!!

Can u pls tell me how can i apply some formatting, like to make a line of text BOLD or ITALICS or can add a line break between sentences?

I have attached the file i m working on, where a paragraph of text is getting loaded from "notepad" (loading from the notepad is necessary) into flash within a dynamic textfield with a scroller. I have made all the things bt i want to make the first line bold or italics or can change color.

I am using Flash MX.

Pls Help!! I need king help.

Thanks

Kallol

Formatting Dynamic Text.. But Different
I've seen many posts about formatting dynamic text but they all seem to use HTML, I need another option to work directly in the flash player.

dynText = "this is my text"

I'd like to make say, "is my" in bold and the rest not using actionscript.

Any ideas?

Formatting Dynamic Text [F8]
I have a project with multiple instances of a movie clip on the timeline. I am interested to know how you would dynamically add text to the to the movie clips so that the text was centered vertically on each object?

For the record...
Yes, this is related to my last post. The lack of replies suggested that my solution was so cludgy that no one could figure out what I was doing. :^) Consequently, I am asking for a completely new method that would help me a) accomplish the task and b) help me be a better programmer.

Thanks!

Dynamic Text Formatting (win Vs. Mac)
I'm dynamically loading some text and formatting it using CSS and everything works just fine, except that Windows does not seem to format the text properly (tried IE & Netscape). It works just great on my Mac. Attached below are some pictures - I think I embedded a different font than what I'm using in my CSS file, but the problem is the same. Windows text looks like crap even if I embed it, and if I don't embed it, it cuts off the bottom of the Asian characters (ie: notice the asian dot at the very end... which is sliced in half). I would really like to avoid embedding asian text since it almost comes up to 2MB in size! Anyone have any experience with this? I've searched all over but can't find anything useful. Any advice would be greatly appreciated. Thanks!

Dynamic Text Formatting
Hi, I just wondering if using HTML tags for formatting text in a dynamic box in flash is the best way to format the text ?
I know AS can format text but i need the text files loaded in to be as simple as possible.(so my client can change content easily).
At the moment they just change the txt in beetween the <tags> in the .txt file.

Can AS load in plain txt and format it line by line or something like that ??
Im not sure how well I am explaining myself on this one.

Any comments tuts would be appreciated,

Thanks

Jonsaul

Dynamic Text Formatting...
I'm pretty new to ActionScripting, and am trying to change some of the formatting on some code...I've been stumbling through tutorials and putting pieces together roughly. Is there a simply way to change the font and justification of this text? code is as follows:
var nWidth:Number = mcDisplayBackground._width;
var nHeight:Number = mcDisplayBackground._height;
var nX:Number = mcDisplayBackground._x;
var nY:Number = mcDisplayBackground._y;
var nInterval:Number;
this.createTextField("tArticle", this.getNextHighestDepth(), nX, nY, nWidth, nHeight);
tArticle.multiline = true;
tArticle.wordWrap = true;
tArticle.html - true
tArticle.textColor = 0xFFFFFF;
tArticle.htmlText = "Founded in 1989, CYW, Inc. has established itself as the leader in the construction fastener industry.";

mcScrollUp.onPress = function():Void {
nInterval = setInterval(scrollArticle, 50, "up");
};
mcScrollUp.onRelease = function():Void {
clearInterval(nInterval);
};
mcScrollDown.onPress = function():Void {
nInterval = setInterval(scrollArticle, 50, "down");
};
mcScrollDown.onRelease = function():Void {
clearInterval(nInterval);
};
function scrollArticle(sScrollDirection:String):Void {
if(sScrollDirection == "up") {
tArticle.scroll--;
}
else {
tArticle.scroll++;
}
updateAfterEvent();
}

Thanks!

Formatting Dynamic Text
I have a dynamic text box with html formatted text in it from an XML document. There is a hyperlink in the text which I'd like to be a different color from the regular text, how can I do that?

Dynamic Text Formatting
hi im new here...1st of all,let me salute all flash experts here lol

i would like to know how will the actionscript code look like in flash when i want to format the external txt file (in the same way like html like - <b> </b> for BOLD lettres, etc) so tat the formatting will appear when the txt file is loaded dynamically into flash....as seen in http://projects.askthefool.com/v4/


i only manage to load plain text wif no formatting when using the actionscript as in kirupa flash mx tutorial


thanks alot and happy belated new year to all!

Formatting Dynamic Text
Hey. I want to format part of my dynamic text, tried HTML but can't make it work. I have one dynamic textfield with a scroller where part of the text should be bold. Help plz!!

And.. this is not important right now but I also have text which is loaded from an XML file and I have the same question regarding that text.

Formatting Dynamic Text
How do I format text in a dynamic text field?? One of the textfields is a regular dynamic textfield with a scrollbar and the other is a text field with text loaded from an XML file. Want to make part of the text bold and larger. Tried with HTML and klicked the "render text as HTML" button in the properties panel but I must be doing something wrong. I'm quite new at programming so Im sure I've just missed someting stupid... Plz help!

FORMATTING DYNAMIC TEXT?
HI, I WANT TO KNOW IF SOMEBODY CARES ABOUT HOW THE DYNAMIC TEXT APPEARS WHEN ITīS SCROLLED, IT'S DIFFICULT TO ME TO ESPLAIN MY PROBLEM BECAUSE MY ENGLISH IS POOR, BUT I'LL TRY, Y PUT THE SCROLL BAR AN WHEN I TEST MY ANIMATION PART OF THE TEXTO HIDE UNDER THE SCROLL BAR SO I HAVE TO MAKE "ENTERS" TU BREAK LINES INTO THE TEXT, THAT MAKES ME THINK THAT I CANīT JUSTIFY THE TEXT, BECAUSE THE SCROLL BAR IS OVER IT. I HOPE SOMEBODY UNDERSTAND THIS MESSAGE.

Dynamic Text Formatting HELP
I would like to dynamically change a selections font, boldness italics etc, by pressing buttons. I have tried many thing s but nothing has come close. Could Someone please help!

Formatting Dynamic Text
Hey. I want to format part of my dynamic text, tried HTML but can't make it work. I have one dynamic textfield with a scroller where part of the text should be bold. Help plz!!

And.. this is not important right now but I also have text which is loaded from an XML file and I have the same question regarding that text.

Formatting Dynamic Text
How do I format text in a dynamic text field?? One of the textfields is a regular dynamic textfield with a scrollbar and the other is a text field with text loaded from an XML file. Want to make part of the text bold and larger. Tried with HTML and klicked the "render text as HTML" button in the properties panel but I must be doing something wrong. I'm quite new at programming so Im sure I've just missed someting stupid... Plz help!

FORMATTING DYNAMIC TEXT?
HI, I WANT TO KNOW IF SOMEBODY CARES ABOUT HOW THE DYNAMIC TEXT APPEARS WHEN ITīS SCROLLED, IT'S DIFFICULT TO ME TO ESPLAIN MY PROBLEM BECAUSE MY ENGLISH IS POOR, BUT I'LL TRY, Y PUT THE SCROLL BAR AN WHEN I TEST MY ANIMATION PART OF THE TEXTO HIDE UNDER THE SCROLL BAR SO I HAVE TO MAKE "ENTERS" TU BREAK LINES INTO THE TEXT, THAT MAKES ME THINK THAT I CANīT JUSTIFY THE TEXT, BECAUSE THE SCROLL BAR IS OVER IT. I HOPE SOMEBODY UNDERSTAND THIS MESSAGE.

Dynamic Text Formatting
In response to a recent post about dynamically formatting text, I thought it might be cool to include some usability features around dynamic textfields as standard.  Here's a demo - I think I'll tinker a little more with it, but the essence is there.

http://www.porcupine.fsworld.co.uk/Tek-Tips/dynamicFormatting.html

Source files:

http://www.porcupine.fsworld.co.uk/Tek-Tips/dynamicFormatting.swf

http://www.porcupine.fsworld.co.uk/Tek-Tips/dynamicFormatting.fla

Let me know what you think!

Formatting Dynamic Text
The search feature was down to I am hoping you all can help me. I want to import in a Flash MX 2004 some text and have it nicely formatted like it would look in HTML. Now Tables are not supported so how can I get text to look like this vs this.

last first middle
abc and mds

I want this

last    first    middle
abc     and      mds
abc     and      mds

Is this possible?

Dynamic Text Box Formatting
Hey guys,

I'm linking some text through XML to dynamic text boxes and I need to know if there's any way (other than directly editing the font) to change the displayed text's kerning?

Using MX 2004 Pro.

Dynamic Text Not Formatting (sometimes)
I have everything working nearly flawlessly. Actionscript is parsing an XML file and dropping html code into a dynamic text box (from the xml file). This works fine. It is even parsing the html markup. For example, <p align="right"> will align the text to the right in the dynamic text box.

However... Tags such as <b>name</b> and <i>name</i> do not seem to do what they are intended to do. They actually seem to delete the text when displayed on the screen? <strong>name</strong> does nothing and also does not delete the text. Any ideas?

One thing I should mention is that I'm using an embedded font and is antialiased to readability.

Dynamic Text Formatting
I seem to be having trouble getting exact formatting with dynamic text fields. The bold just isn't bold enough. Any ideas? considered applying css properties - will that give me better formating?

I have tried multiple approches. From creating fields in AS, to just placing them in the movieclip. I would like to just place a field in the movie clip, and just update the text based on my arrays - but artistically - I can get the right formatting for the layout.



Robert

Formatting Dynamic Text
http://videos.pappastv.com/ntv/localpolitics/election_results.html

I'm pulling 4 of the text fields into the flash file dynamically with this code from an external website.


Code:

var record_arr = [];
var fieldnames_arr = [];
var loader = new LoadVars();
var irecord = 0;
/*** load the file ***/
loader.load("http://videos.pappastv.com/ntv/localpolitics/proxy.php");
/*** functions ***/
// use onData because text file is not of the form var=value&...
loader.onData = function(dat) {
// split on
for files on windows server
var input_arr = dat.split('
');
// split on
for files on linux servers
if (input_arr.length == 1) {
input_arr = dat.split('
');
}
// fieldnames are held in fieldnames_arr
fieldnames_arr = input_arr[0].split(',');
for (var i = 1; i<input_arr.length; i++) {
var fields_arr = input_arr[i].split(',');
record_arr.push({});
for (var j = 1; j<fields_arr.length; j++) {
record_arr[i-1][fieldnames_arr[j]] = fields_arr[j];
}
}
loadNextRecord();
};
function loadNextRecord() {
for (var i = 1; i<fieldnames_arr.length; i++) {
this[fieldnames_arr[i]].text = record_arr[irecord][fieldnames_arr[i]];
}
}




I would like to format the displayed text so that it doesn't contain "" around the text and I would also like to see the votes contain , every 3 numbers. Last I would like to change the percentage to an actually % instead of a decimal. I know you can render your text with html so you can format it with action script, but does anybody have a good idea how to accomplish what I'm trying to do? I really appreciate any help.

Thank you

Formatting Dynamic Text With PHP
Hey yall,

I'm using the tutorial from:
http://forums.devshed.com/t171666/s.html

So far, I figured out how to change the spacing between the news stories, and i can customize this baby pretty well. What i'm wondering is if its possible to include images and html links in the formatted text.

Currently, I have a database that has photo number ID's, so I want to be able to put text along with some images and links. Is it possible to do this? If not with this tutorial, is there another way to dynamicaly insert gifs or jpegs? Please advise!

Also, how can I take this example and make it scrollable should the text exceed the height limit of the movie itself?

Formatting Dynamic Text In A Text Box Can There Be Two Different Colors/styles ?
In the code below im loading variables from php that are pulled from a mysql db and printing them out. there is one From: Name then a newline with the message. they both go to the same dynamic text feild as you can see i set the color to black .. is there anyway i can make the from:name one color and the message another ? or maybe just have the from: name in bold ? if i set the textcolor to one color before the from line and another afterwards it changes the color of everything ?

Code:
myVars.load("testiflash.php");
myVars.onLoad = function( ){
trace("variables loaded");
}
myVars.onLoad = function( success ){
if(success){

testi.textColor = 0x000000;
i=0;
while (i<myVars.endmsg){
testi.text +="From:" +myVars["testiname" + i];
testi.text +="
" + myVars["testimsg" + i] +"

";
i++;}


}
}
any ideas ?
thanks in advance !

Formatting Text In A Dynamic Text Field Loaded From XML
I've got a mysql table that feeds content into a php script which then formats it as XML and then gets loaded into a dynamic text field in flash 8.
What i'm trying to figure out is how on earth do i format this xml so that when its loaded into flash the main blog article is in italics? (goto
http://www.jacksrambles.com and then click on the blog button)
Do i do it in the PHP script or in the actionscript in flash.
Heres my current actionscript:
Code:

var theXML:XML = new XML();
theXML.ignoreWhite = true;
news_txt.html = true;
theXML.onLoad = function(){
   var itemNodes = this.firstChild.childNodes;
   for(i = 0; i < itemNodes.length; i++){
      var date = itemNodes[i].childNodes[0].firstChild.nodeValue;
      var title = itemNodes[i].childNodes[1].firstChild.nodeValue;
      var body = itemNodes[i].childNodes[2].firstChild.nodeValue;
      news_txt.text += date +"
" + title +"
" + body +"


";
   }
}
theXML.load("http://www.jacksrambles.com/news.php");

And heres the PHP script:
Code:

<?PHP

$link = mysql_connect("localhost","username","password");
mysql_select_db("jack777_site");

$query = 'SELECT * FROM news';
$results = mysql_query($query);

echo "<?xml version="1.0"?>
";
echo "<news>
";


while($line = mysql_fetch_assoc($results)) {
   echo "<item>
";
   echo "<date>" . $line["date"] . "</date>
";   
   echo "<title>" . $line["title"] . "</title>
";
   echo "<entry>" . $line["entry"] . "</entry>
";
   echo "</item>
";

}


echo "</news>
";

mysql_close($link);

?>

Formatting & Aligning Dynamic Text
I am building a game using actionscript. It has a high score functionality (top 10 scores stored in db). The score & name pairs are retrieved from the db and placed in variables nameX and scoreX where X = 1-10, from largest to lowest score (1 being the top score). I am having trouble formatting the high score screen.

I currently display ranked names followed by their score in a large dynamic text field bound to a variable that I set up with all the appropriate values, but I can't figure out how I can align all the scores vertically so that instead of this:
1.cybertank 10000
2.some other guy 9000

I get
1.cybertank---------10000
2.some other guy----9000

I tried achieving this by simply adding certain amount of spaces, or other spacing characters, between the name and the score (like i did on this post), but since I use a true type font for display certain letters are larger than others, the approach failed. Even if it had worked though, I hate taking the "guesstimating" approach to formatting, where if it looks good on my screen its ok. I like to be sure it will be formatted on all screens. I'm not sure how valid a concern this is in flash, but in HTML and Java it is.

In html it would be easy, because I could make a table. In other languages, like Java, I could either use layout managers to achieve alignment, or place the name and score in specific X,Y coordinates.

In flash I'm do not know how to approach this. I haven't found a way to dynamically add new text objects into a movie at specific locations with specific sizes. If I could do this, I could do the equivalent of saying "add name XXX at (x,y), add score XXX at (x,y)" and then move down the y coordinates.

Right now, I can only place blank text fields preemptively and bind them to certain variables. But although I might be able to make 20 different text fields (10 for name, 10 for score) and meticulously align them by hand, I would like to find a way to automate the process (i.e. - what if eventually I want to reduce the size of the font and have a top 15 score ranking?)

Any suggestions would be greatly appreciated, be they solutions to my specific problem or just general text handling tips. Feel free to e-mail me at the address above, but also post your replies to the forum so that everyone can benefit.

Thanks.

Dynamic Text Formatting Issues
Hi again, all.

I just have a quick question. I am using dynamic text boxes, no problem, got them working (thanks to oldnewbie). But, the issue I am having is with the text in the dynamic box itself. It seems to be spacing itself rather generiously and I would like to know how to fix it.

here is the site I am working on: http://www.slqu.net/temp/

thanks in advance!


peter

HELP With Dynamic Text & HTML Formatting
I am loading a text file into my flash website and I have formatted the .txt with HTML tags so I can do bold, font color, url's etc...

I have also clicked on the <> button on the textfield properties so Flash can read the formatting.

When I choose to embed all the characters, the only thing that doesn't work is Italics. When I don't embed, it works.

Anybody know a way around this??? Or why it does this?

Any help is appreciated.

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