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




HTML Formatting Of Dynamic, AS Loaded Text



Hi guys,
Is there a way to format text loaded into a dynamic text box using
code: textbox1.text = "some text"

I want to dynamically load some hyperlinks into a dynamic textbox using the above code, i.e
code:
textbox1.text ="<a href = http://www.somesite.com> Link 1 </a>"

(cant remeber if that's syntactically correct, off the top of my head)
However, this doesnt recognises the <a href> tags and just displays them as part of the text.

Can anyone offer some help?



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-10-2004, 09:48 AM


View Complete Forum Thread with Replies

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

Formatting Text Loaded From External Txt File As Html In Flash
I need to format and display a large piece of essay in flash. i feel the best way is to create a txt file with html formatting then declare it as a variable in the txt file, then laodvariable into the flash file calling for the txt file, while refering the flash textfield to the variable declared. The problem is, after saving the large piece of essay in html format using either word, or dreamweaver, it contains A LOTA crap/useless tags that will not be recognized by the flash engine, thus screwing up the field, rendering nothing to be displayed. If I take out those tags such as <p> then it will work fine. However, as I mentioned this is a large piece of data it is literally impossible to do it manually. While I want to preserve the "italics" (actually this is the only format I wanna preserve) I need to get rid of the other junk, is there an easy way to do this?

Thank you for your time

Html Formatting Of Random Text Messages Loaded From TXT File
I am loading various text messages from a text file randomly using flash and php. I want to format the text a certain way and want to pass in html instead of just dynamic text. The php code is parsing out each line seperately and loading a random message. (1 line = 1 message)

Any ideas on how to set this up? thanks!

Formatting Dynamic Text Loaded From A .txt File
Hi!
First of all, I'm using FLASH 5 (not MX)

I'd like to know if there's a way to give different formats to a Multiline Dynamic text-box which has been loaded from a text file. I know this an be done by using several boxes and formatting each one to the desired format, but I need to use just one text-box. Otherwise I shall be using too many text-boxes with several tweens and this all may become extremely complex and huge in kb size.

What I'm doing is a very big menu from a Restaurant.
Just as an example:

-- MARGHERITTA PIZZA --- Tomato, Mozzarella --- 5,40 €(Euro Symbol)

I'd like
"MARGHERITTA PIZZA" to have a font size of 15 and bold.
"Tomato, Mozzarella" to have a font size of 13 and NON-bold.

And very IMPORTANT...I'd like the € (Euro symbol) to be properly displayed, and not just an empty square.

Can anybody help me a bit please?
Thank you.

Manare

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.

[F8] Html Formatting In Dynamic Text...again
I know this has been covered ad nauseum but reading all the different posts has just spun me around in circles.

Why is it that this:
narratives_txt.html = true;
narratives_txt.htmlText = "<b>This is my BOLD text</b> and this is not.";

Returns:
"and this is not."

And what's the proper way to get it to display?

Thank you!
Layne

HTML Formatting In A Dynamic Text Box
Can't seem to get this to work. Some formatting works (<a>) but not well. <b> just drops the text all together.

I'm loading my text into a dynamic text box with:


ActionScript Code:
// loadVariables("blogText.txt", "_root.masker.contentText.blogtext");

myData = new LoadVars();
myData.onLoad = function() {
    _root.masker.contentText.blogText.htmltext = this.content;
};
myData.load("http://www.rjames.org/blogtext.txt");

The text box has the HTML property turned on.

Any idea what's causing this?

Html Formatting In A Dynamic Text Box
I have a problem. Can anyone help me please?

On this site, I'm just creating an intro and bio...
http://www.cherylankrah.com

However, the html is not acceting the formatting this is the flash file:

Also, any idea why, maybe for other reasons than flash, I'm getting a text arser message when i open the page...
http://www.thegreenink.net/stuff/siteupdatesign.fla

jan

please help me urgently

Formatting Dynamic Text With Html
i am trying to form text with html. rending text as html is on. but the html is showing as test

my code:
info = " Donna Bonessi <I>President</I>";

HTML Formatting Dynamic Text
Hi guys



I’ve used one of the tutorials on the site to import text into a dynamic text box




Code:
loadText = new loadVars();

Code:

loadText.load("kirupa.txt");

//creating the loadVarsText function

loadText.onLoad = function() {

scroller.text = this.kirupatext;

};




I’ve got a horizontal scrolling movie that duplicates the clips from the number of results passed to it by another script, and creates buttons with imported images and links with different querystring id data on them. So in actual fact what it does is instead of



loadText.load("kirupa.txt");



It does



loadText.load("http://www.mysite.com/variablespage.php?id=1");



Now this is all works fine apart from 2 things.


A double return in the text result in a massive gap in between the paragraphs? I don’t know where it’s coming from. The
isn’t being converted to <br> or anything like that, does anyone know why the gap is so big?


I thought I might be able to fix it by setting the box to render text as HTML, but it seems to be ignoring any HTML tags.


The other problem is if I type

Code:
<a href=”address.php”>Link</a>




It just shows that and doesn’t make it a hyperlink?



If I change the script to LoadNumVariables and the scroller text box has a variable ie scroller.scroller_text then it shoes the html working fine, but won’t scroll it anymore!!!



Any thoughts appreciated



Regards



Paulsheff

HTML Formatting In Dynamic Text
Hello all,

can someone please advise...I created a dynamic text field which calls up an external text file and the text field scrolls once the text has been loaded, the problem however is that it will not display the html links within the txt document.

when i get it to properly display the html links it no longer scrolls.

does anyone know a very simple way to achieve scrolling dynamic text with html formatting?

here is the code on frame:
loadVariablesNum("natan.txt", loadTxt);


natan.txt is the text file and loadTxt is the dynamic textfield

here is the text from the text file:
text=<a href="http://www.fudge.com" target="_blank">fudge</a>

and the var in the txtfield = text

what am I doing wrong?

thanks in advance

Dynamic Scroll Text Box With Html Formatting
I found this code in a tutorial i downloaded of the FK website (Dynamic_-Greg_Mey-1492) Its a Dynamic text box scroll script. The text is loaded from an external .txt doc. The original txt had no formatting. I need bold, returns <br> etc.

OK, i know about the HTML formatting in flash(<br> etc)! The problem is that when this is active and the viewer drags the slide bar down and lets go the slider reverts the original position. I’m not that familiar with dynamic scripting so I thought that you could have a look and see it there’s anything odd about the code. Thanks




//-----------------------------------------
//-----------------------------------------

scrollboxtop = _root.scrollbar.scrollbox._y;
scrollboxbottom = _root.scrollbar.scrollbox._y + (_root.scrollbar.scrollbox._height) ;
if (textbox.Message.scroll=1) {
if (scrollboxmove >0) {
scrollboxmove = 0;
}
_root.scrollbar.scrollbox._y = -68;
} else if (scrollboxbottom - scrollboxmove > 70) {
if (scrollboxmove <0) {
scrollboxmove = 0;
}
_root.scrollbar.scrollbox._y = 70 - _root.scrollbar.scrollbox._height;
scrollboxmove = 0;
} else {
_root.textbox.Message.scroll = _root.textbox.Message.scroll + scrollboxmove;
}


//-----------------------------------------------
//-----------------------------------------------

No Html Formatting For My Dynamic Text File
I have a .txt file that is outside my swf and loaded dynamically using a variable name. All is up and running and works fine. The only problem is that when I try to enable HTML formatting in the properties inspector, I can't see my imported text (meaning it's not recognized), when I turn of the HTML option, it's back again.

What am I doing wrong? I know HTML, I know Flash, but I just can't figure out why I can use the simple tags that Flash supports.

HELP!!!

Dynamic Text, HTML Formatting AND Javascript?
im building a site with a page of links that the owner will be updating and adding to. ive managed to get the HTML formatting part down but is there a way to make the links pop open a new window instead of just replacing the existing page. i was using a "click here" button before that opened a new window and got the link dynamically but now they want to have an unlimited number of links so im putting the whole thing in a scroller so it can just continue. any idea of how to get the pop ups happening from the HTML formatted text?

gracias

HTML Formatting & Dynamic Text Fields
I’m sure this is a no-brainer, but I can’t see the wood for the trees right now. I’m pulling in some text from an external txt and dumping it into a HTML enabled, multi-line dynamic text field.

I’ve embedded the font’s I require and that doesn’t appear to be the problem.

The text in the txt runs as follows...

&bodyText=<*font size="16" face="HelveticaNeue Condensed" color="#FF6600"><*b><*i>Sub Head text<*/b><*/i><*/font>
<*font size="12" face="Helvetica 55 Roman" color="#666666">Body Text<*/font>&

(added * above to prevent HTML parsing)

Now, no matter what I do, I can’t get anything passed the end of the first <*/font> tag to display. So in the case of the above, all I get is a correctly formatted…

Sub Head text

...and that’s it. Nothing else.

Any suggestions you could make would be most gratefully received.

Thank you kindly.

Problem With Formatting Html In Dynamic Text
could someone please show me how to properly format html that load into a dynamic text field. My problem occurs when I try to make a href link that is a different color than the body. Are there any good references out there.

example:

10.16.03
Please go to my new website at www.thebarnburner.com. I'm sure you will enjoy it.

I want the 10.16.03 in bold.
The link needs to have the href and be in a different color, say red.

HTML Dynamic Text Formatting Errors
I've read every thread on nearly every forum about this, but it doesn't seem to want to work with me. I am trying to format my external .txt file with html. For example, <b>welcome</b> or <i>welcome</i>

To load the text

Code:
loadText = new loadVars();
loadText.load("text1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
preloadMC.unloadMovie();
main.myText.html = true;
main.myText.htmlText = this.myNews;
}else{
preloadMC._visible = true;
}
}
The instance name of "main" being the movieclip that has the dynamic text contained within it.
And yes, the dynamic text has the render as html button selected.
And in a .txt file i have myNews = etc, etc, text goes here.

Thank you all very much for any responses.

HTML Formatting Incorrectly In Dynamic Text Box
So I'm still working on the CMS with Flash site and have encountered another thing that puzzles me.

I'm reading a .PHP page from my server and loading it into Flash and it returns HTML - and luckily not the .PHP script code - to Flash - so that's great.

Except for that it totally ignores the html and shows stuff like %22%3E%09%0D%0A%09%09%09%0D%0A%09% rather than follow <BR> points and spaces and punctuation and what not.

What I'm doing is:


Code:
var menulunch:LoadVars = new LoadVars();
menulunch.load("content.php");
menulunch.onLoad = function(success:Boolean) {
if (success) {
contentveld.htmlText = this;
} else {
trace("could not load text.");
}
};
What am I missing this time ?

Formatting A Dynamic Text Box To Take HTML Coding?
Does anyone have an idea of how to do this
Does anyone know??

Here is the AS i used for my external text loading:

myData = new LoadVars();
myData.onLoad = function() {
Home_Text.text = this.hometext;
};
myData.load("hometext.txt");

Anyways of altering that AS code to accept HTML rendering?

Thanks

Abstuce - Hard 2 Understand

HTML Formatting Not Showing Up In Dynamic Text
I have a dynamic text box with this code associated with it:

Code:
aText.htmlText = "";
aText.htmlText += "<b><a href = " + aRSSLinks[i] + ">";
aText.htmlText += aRSSTitles[i] + "</a></b><br />";
aText.htmlText += aRSSDescriptions[i] + "<br />";
The text comes up, but is not formatted as bold or linked. When I trace(aText.htmlText); there are a bunch of random <TEXTFORMAT>, <P>, and <FONT> tags, but not the <b>,<a>, and <br> tags.

Any ideas? Thanks.

Dynamic Html Text Formatting Problems
Hi

im loading an html text into a dynamic flash field with html enabled.  This is giving problems with the formatting

the content is loaded from an external file like so:

CODEcontent=<b>bold text</b> bla bla bla bla

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);

?>

Dynamic Text Fields, .txt Files And Html Formatting
Basically like the title says, I have my dynamic fields loading external text files. I have the html formatting working, the basic bold, italics, and stuff.

Basically I am designing a site that will be updated by the customer, but with bad experiences from previous clients they screwed things up a lot and I'd have to go in and fix it. I want to create a site that can easily be updated with text files that they can put whatever they want...

A question though, with html formatting, is there a way to include <a href></a> tags so they can put in their own links? Or is this strictly for text formatting.

Any help would be gladly appreciated

[F8] Apply HTML Formatting To Dynamic Text Sourced From XML
Hi, I would have though that this would be a simple procedure but can't find any info that makes sense..
How do I format my dynamic text pulled from an xml source?
i.e. I wish to apply HTML formatting to my XML doc including <b>, <br> etc.
However, when I apply these tags the doc just fails to load into my dynamic text box. I've tried checking render text as HTML but that hasn't worked..
Where am I going wrong? This has to be an easy one..

Thanks,
DigiPencil

Dynamic Text Field Ignoring HTML Formatting
Hello,

I have a dynamic text field set to multiline and render as html, but when I assign any text to it which contains simple HTML formatting like <b>boo</b>, Flash Player 9 simply ignores any text between the tags. eg <b>boo</b> doesn't display at all !!!
The text field has both an instance and variable name and I get the same results from both.
If I trace the variable I can see the <b>boo</b> but I can't get it to display.
If I uncheck the render as html option, it displays <b>boo</b> ... obvioulsy unrendered.
I'm obviously missing something simple ... please put me out of my misery.

Thank you.

Formatting HTML Content In Dynamic Text Boxes
Hello,

Does anyone have any tips on formatting HTML content in Dynamic Text Boxes?

I have two specific issues:

1. embedding images is OK if you want to display an odd picture scattered amongst a few paragraphs of text, but if you want to display say three pictures in a row there does not appear to be a clean way of doing so. The pictures just render themselves one on top of another. You can 'force' line breaks, but then the formatting just looks pants and irregular. Am I missing anything?

2. Using a <a> tag you can link content to another page, but is it possible to direct the link to a fresh browser instance as you can in normal HTML using the _blank attribute?

I may be asking too much of what appears to be relatively recently intorduced functionality in to Flash.

Thanks for any suggestions.

TK

Can I Make A ScrollBar Work With Dynamic Text With Html Formatting?
I am loading text from an external file into a textbox with a scrollbar. I have html in the text file to change font color size etc. When I load the text it scrolls ok, but the tags are in the text and it isn't formatted. I checked on the html formatting in the properties box. What could I be doing wrong?

Html-formatting Of Dynamic Text Field With Embedded Font
If you're creating a htmlText field via the createTextField method, is there a way to get html formatting like <b></b> to show up if you are also embedding a font?

I'm guessing not, since you can only embed a single font in a TextFormat, and you would have to embed both italic and bold variants too to make it work. Is this true?

Maybe I'm better off creating a generic text field on the stage with both bold and italics embedded, and use the attachMovie method instead?

This is my code:

ActionScript Code:
myformat = new TextFormat();
myformat.font = "Akzidenz_Grotesk_BE_Light";
myformat.size = 20;

curr_image = curr_top.createTextField("largetext", 401, 242, 32, 682, 254);
curr_image.selectable = true;
curr_image.multiline = true;
curr_image.html = true;
curr_image.embedFonts = true;
curr_image.htmlText = "Hello <i>this</i> is a <b>text</b> field";
curr_image.setTextFormat(myformat);

Auto Formatting Html Links With Color In Dynamic Text Field
formatting html links using cdata
I am parsng a xml document that has html along with text, I am bringing the xml into a dynamic text field. I can retrive the same data from cdata tags as well.

I get the links into my document ok but I need to color the links so user can tell they are links.

Know anyway to do this?

MAybe a function that will take your text, look for the hrefs and add the color thing in the text.

anyone devloped this or know of a workaround?

I unfortunatly cannot modify my xml

Example xml and .fla here:

http://lincart.com/xml_feed_samples.zip

Here is a srting prototype I found that might do what I need but I cannot figure out how to implement???



String.prototype.makeClickable = function(){
var tmp = this.split(" ");
for(var i = 0; i < tmp.length; i++){
if(tmp[i].indexOf("www.") != -1 && tmp[i].indexOf("http://") == -1){
tmp[i] = "<font color="#0000FF"><u><a href='http://"+tmp[i]+"' target='_blank'>"+tmp[i]+"</a></u></font>";
}else if(tmp[i].indexOf("http://") != -1 || tmp[i].indexOf("ftp://") != -1){
tmp[i] = "<font color="#0000FF"><u><a href='"+tmp[i]+"' target='_blank'>"+tmp[i]+"</a></u></font>";
} else if (tmp[i].indexOf("@") != -1 && tmp[i].charAt(0) != "@" && tmp[i].charAt(tmp[i].length-1) != "@") {
tmp[i] = "<font color="#0000FF"><u><a href='mailto:"+tmp[i]+"'>"+tmp[i]+"</a></u></font>";
}
}
return tmp.join("&nbsp;");
}

how would it apply to my code?

do I assign the tmp var to my var?


//frame 1 parse xml

function Article(id, news_item) {
this.id = id;
this.news_item = news_item;
}

function makeArray(success) {
var i, j, mainTag, id, news_item;
if (success) {
for (i=0; i<=moXML.childNodes.length; i++) {
if (this.childNodes[i].nodeValue == null && this.childNodes[i].nodeName == "idj_news_feed") {
mainTag = this.childNodes[i];
}
}

for (i=0; i<=mainTag.childNodes.length; i++) {
if (mainTag.childNodes[i].nodeName == "record") {
articleTag = mainTag.childNodes[i];
id = articleTag.attributes["id"];
for (j=0; j<articleTag.childNodes.length; j++) {
if (articleTag.childNodes[j].nodeName != null) {
if (articleTag.childNodes[j].nodeName == "news_item") {
news_item = articleTag.childNodes[j].firstChild.nodeValue;
}
}
}
thisArticle = new Article(id, news_item);
articles.push(thisArticle);
delete thisArticle;
}
}
_root.gotoAndStop("showArticles");
}
}

// articles is an array of Article objects
var articles = [];

// read xml and display when loaded
moXML = new XML();
moXML.ignoreWhite = true;
moXML.onLoad = makeArray;
moXML.load("demoNews.xml");
stop();

// frame label showArticles

news = "";
for (i=0; i<articles.length; i++) {
news += "<a href='" + articles[i].link + "'>" + articles[i].news_item + "</a><br>";
//news += " <font color='#cccccc'>(" + articles[i].source + ")</font><br>";
}
scroller.html = true;
scroller.htmlText = this.news;
stop();


thanks for the help I am still getting a grasp on coding.

Evaluating Dynamic Text Loaded As Html
I am using Flash-MX to load text from a .txt file that has a list of different dates of events to a dynamic text box with text rendered as html. What I am wanting it to do is evaluate if the date of the event has passed or not. The past events I want to appear ghosted, the most current event that has not passed I want to be in red text and all the subsquent events that have yet to pass I want to appear in black text. Some of the events are also hypelinks to make it more complicated. I'm not sure if I have to load each event in a seperate variable, I'm guessing I will, but not sure how to make Flash read the string and interpret the date so it can evaluate it.

Html Anchor In Dynamic Loaded Text
Hi,

I'm using a movie that loads an CSS en HTML file for displaying text. The CSS is applied and working. The HTML is also recognized. But I wanna nagivatie within this text such as a normal webpage:
<a href='#label' target='_blank'>Tester</a><br>
<p>textetxtetxtetxtetxtetxtetxtete</p><br>
<a name='label'>My anchor to go to</a>

I applied this to the html that is loaded in my Flash movie but it doens't do his job...can anyone help me to find the right way to make this work ????

manny manny thanx...

HTML Loaded Into A Dynamic Text Box Within Flash
I have a question. I am building an Online store. The main part of the site will be Flash. I was wondering if it is Possible to design a simple HTML site with graphics and text and dynamically load it into a text box within my main flash movie. Does that make sense? Basically be able to dynalically call a HTML site so that it would be easy for someone to update it's contents and images without having to know flash. Anyone know? Thanks a lot.
-ROB

Html Anchor In Dynamic Loaded Text
Hi,

I'm using a movie that loads an CSS en HTML file for displaying text. The CSS is applied and working. The HTML is also recognized. But I wanna nagivatie within this text such as a normal webpage:
<a href='#label' target='_blank'>Tester</a><br>
<p>textetxtetxtetxtetxtetxtetxtete</p><br>
<a name='label'>My anchor to go to</a>

I applied this to the html that is loaded in my Flash movie but it doens't do his job...can anyone help me to find the right way to make this work ????

manny manny thanx...

Html Char. Entities In Loaded Dynamic Text? Please Help
So I ran into a problem today when trying to insert HTML charachter entities from a .txt file into a dynamic text field. As it should do, flash pics up the & char. as a variable break and does not recognize it as an entity symbol. Yes I have my text field set to .html... I am trying to display an apostrophe(') ... it comes up as a block in flash when loaded from the html enabled text... so I inserted the entity &apos; but this breaks the variable... How do I get apostrophes(') to appear in my loaded html enabled text field? thanks for the help. if you can't do this, i hope macromedia is working to fix it.

Ext Loaded Dynamic Text: <HTML Tags Failing>
I'm loading text from an external .txt file. I want to put html tags to change the color and add links.

The links I can get to work, but when i change the color ...everything after the color change disappears when it's loaded.

Is there a fix for that in Flash MX?

Can anyone help?

thanks

Externally Loaded Dynamic Text Does Not Show In Html...
Hi. I'm new to this so don't be surprised if this is a stupid mistake. I went through a tutorial here called "Tutorial 34 - scrolling a text box II", in which text is read from a txt file into a dynamic text field. Everything worked fine.

The problem arises when I put the scroll box into a movie I was working on. It previews fine. It plays fine when uploaded (www.mysite.com/flash.swf). However when embedded into an HTML doc the movie doesn't show any text (www.mysite.com/flash.htm).

I wish I could discuss the code with you guys, but I have no script skills and pretty much copy-pasted the code. I have attached the files in the hope that someone will be able to look at them and tell me where I went wrong. Any help is most appreciated.

Access Images Loaded Through Dynamic Text Containing Html
Dynamic text field containing


HTML Code:
<img src="http://www.kirupa.com/forum/stylesV2/Clever/clever_header.jpg" width="1000" height="75" id="mc_movieClip"
variable="value"/>
I don't have any clue to how i would access that image through actionscript, thought i know you can. I've searched around 100 actionscript blogs tonight trying to find the answer. I've tried a bunch of stuff and i just can't get it to work.

Anybody have any idea? Its a bit late xD maybe its just me

External Loaded Dynamic Text Disappearing With Certain Html Tags
Sup All //

Title says it all. Doing a site for a client, and I have a news section that has an external .txt file that loads dynamically into a text box in flash. Basic, stuff .. no sweat.

However, I am embedding the typeface for this text box, and because of that only certain html tags are making the text disappear. If I don't embed the type it shows up just fine. One in particular is the <B></B> tag. I want to bold the date so it would look like this:

2.15.07 news text goes here.

basic stuff, however it shows up like this:

news text goes here.

The date is being cut out all together. I double checked and made sure my tags were correct. They are. I also have links tagged, and other <font></font> tags, that are properly showing up. So why is <B></B> so special ? any thoughts?

thanks all
-m

External Html Loaded Into Dynamic Scrollable Text Block
Hello everyone,

I using the code form the gotoAndLearn tutorial "HTML+CSS+Flash".

I'm trying to load the html file into a dynamic textbox, which is fed into a movieClip (using the scrollPane component), which is all inside of another movieClip.

This doesn't sound to tricky... but It's not working. I suspect the problem is with the scrollPane. Or maybe i can't get the path right.

Help? Anyone?

Thanks,

Viva La Brimelow!

Dynamic .txt File HTML Formatting?
Ok.. I have a dynamic text box. Fonts embedded, using the flash mx scrollbar component, the dynamic text box's instance name is "scroller".

The actionscript code I am using is as follows...


loadVarsText = new loadVars();
loadVarsText.load("news.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
scroller.html = true;
scroller.htmlText = this.var1;
} else {
trace("not loaded");
}
};



And.. my news.txt file starts with var1=

Everything loads/works fine UNTIL I try using html tags in my news.txt file. The one I need to use is the <b></b> bold tag and the font color tags. When I put text inbetween the html tags, nothing shows up. Under my Dynamic Text box properties, the button with <> enabling HTML formatting is selected....

absolutely stumped! ANY HELP would be MUCH APPRECIATED THX!

Formatting Loaded Text
Hi folks,

My plan is to load text files (.txt) containing song lyrics to a dynamic text box. In the final .swf, I want to keep each verse separated in its own line but without the big space (leading) that Flash assign to each Return/Enter in the original .txt file.

Is it possible? Should I use a different method?


Thanks!!


The Saltamontes...

Loaded XML Text Not Formatting
Hello,

I am loading text from an XML file and populating dynamic text fields, the text fields are all set to render as HTML. However when the XML data loads, it's not displaying properly. I think it may have to do with how the XML data is parsed, but I'm not sure how to change it. Also, is I do not set the text fields to render as HTML the node name will display in text fields.

Thanks for any help.


ActionScript Code:
function generateText(){
    trace("success!");
    var page = file_xml.firstChild.firstChild;
    var pageTitle = page.firstChild;
    var leftTitle = page.childNodes[1];
    var contentMain = page.childNodes[2];
    var contentLeft = page.childNodes[3];
   
    section[0].pageTitle_txt.html = true;
    section[0].pageTitle_txt.html = true;
    section[0].pageTitle_txt.htmlText = pageTitle;
    section[0].leftTitle_txt.htmlText = leftTitle;
}

var file_xml = new XML();
file_xml.ignoreWhite = true;
file_xml.onLoad = function(success){
    if(success){
        if(file_xml.status != 0){
            trace("error in xml file, error = "+file_xml.status);
        }
        generateText();
    }else{
        trace("Error loading XML file");
    }
}
file_xml.load("health_02_types.xml");

Dynamic .txt File With Simple HTML Formatting?
Ok.. I have a dynamic text box. Fonts embedded, using the flash mx scrollbar component, the dynamic text box's instance name is "scroller".

The actionscript code I am using is as follows...


loadVarsText = new loadVars();
loadVarsText.load("news.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
scroller.html = true;
scroller.htmlText = this.var1;
} else {
trace("not loaded");
}
};



And.. my news.txt file starts with var1=

Everything loads/works fine UNTIL I try using html tags in my news.txt file. The one I need to use is the <b></b> bold tag and the font color tags. When I put text inbetween the html tags, nothing shows up. Under my Dynamic Text box properties, the button with <> enabling HTML formatting is selected....

absolutely stumped! any help will be awesome! thx!

Dynamic .txt File With Simple HTML Formatting?
Ok.. I have a dynamic text box. Fonts embedded, using the flash mx scrollbar component, the dynamic text box's instance name is "scroller".

The actionscript code I am using is as follows...


loadVarsText = new loadVars();
loadVarsText.load("news.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
scroller.html = true;
scroller.htmlText = this.var1;
} else {
trace("not loaded");
}
};



And.. my news.txt file starts with var1=

Everything loads/works fine UNTIL I try using html tags in my news.txt file. The one I need to use is the <b></b> bold tag and the font color tags. When I put text inbetween the html tags, nothing shows up. Under my Dynamic Text box properties, the button with <> enabling HTML formatting is selected....

absolutely stumped!

thx!

Dynamic Textbox Not Displaying HTML Formatting
Hello Again,
I'm trying to dynamically display contents of a PHP page in a flash application. The output from the php page is like:

PHP Code:





echo "tbox_content=<b>Still%20Testing</b><font color="#FFFFFF">Bye</font>"; 






I have a dynamic textbox used to display this content but instead of applying the HTML tags, it displays everything.

I have the "Render text as HTML" property of the dynamic textfield toggled to "on". Any help as to what's causing this or what else I need to do

Thanks.

Formatting Loaded Text Variable
Hey guys,
I loaded a variables from a text file into a movie. The text file had the following command: text='asfdas';. However, how do i format and move the text variable around in my movie. Every time i change the position of the movie variable, it doesnt seem to be affected when I when publish the movie. Thanks so much guys. I just want to be able to control the location of the text file once it gets imported. Thanks

Text Formatting On A Loaded .txt File.
how do i add text formatting to a text file which is loaded into a scrollable text-field in flash? i want to have certain parts of it in bold, or different font sizes, or italics etc....

thanks.

Formatting Text Loaded With LoadVars();
I am dynamically loading text with LoadVars from an external txt file. Here is my script:

var lvText = new LoadVars();
lvText.load("data.txt");
lvText.onLoad = function(bSuccess:Boolean) {
tInfo.text = this.data;
if (bSuccess) {
trace("text loaded");
}
};

I can easily add new text to the TextField in my SWF file, however, formatting seems to be a problem. I can format text with HTML tags, CSS or TextFormat object before publishing the SWF What I really need is to somehow apply the formatting to the external txt file without remaking the SWF... I tried adding HMTL tags to the txt file, however, flash just treats them as string data... how can I make it recognise the tags?

Formatting Externally Loaded Text
Hi all... I am trying to format externally loaded text into a Flash file, I realise I can use CSS but both the heading and body text use different obscure fonts, anyone know how to do this so the external text can be in one file? Or do I need to load heading and body text separately? And format the actual Text Fields in Flash by embedding the fonts?

Dynamically Loaded Text Formatting?
hey i have a tex file loaded and was wondering if i can make it so when i do backspace in my editor, it wont skip a line in flash.

hostingbox=3000 MB diskspace
45 GB bandwidth a month
FrontPage Server Extensions
Unlimited Websites Per Account and E-mail Account
PHP 4.3.2 , SSI, CGI, Unlimited MySQL databases
Custom Error Pages
24/7 FTP Access
Agora Shopping Cart
cPanel 7.2.0 "X"
Fantastico v2.0
.htacess
Live AIM Support
Streaming
Instant Online Activation
Guaranteed 99% uptime

and i get this:

3000 MB diskspace

45 GB bandwidth a month

FrontPage Server Extensions

...


is there any way to get rid of those extra lines? I found out a way to do it with using spaces, but it almost defeats the purpose of dynamically loaded text and just easier to edit in flash...

thanks for your help

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