Click to See Complete Forum and Search --> : Possilbe to have included text in ActionScript?


biggie101
05-29-2006, 04:05 PM
so i'm in a bit of a Dilemma here...
so i'm building a small web site for a small business... one-guy-to-do-everything small..
so he needs to be able to update the content of his site (of course) as easily as possible... and i figure the easiest way to do that is have some kind of include file which will put text on page itself...

and so... i'm wondering if i can accomplish this with ActionScript within a text area...

so basically whenever he needs to update a piece of content, all he really has to do is edit a certain text document and he's good to go


so first off.... is it even possible to have text displayed on the browser coming directly from a text document (either .txt or .doc)?

Albert_chu
05-31-2006, 04:30 AM
yes. it is possible to have text displayed from an existing.txt file, however im not so sure about a .doc file. since you can edit a .txt file, you probably wouldnt need ana ction script..jsut edit the .txt file and just upload it to replace the existing file whenever u need it to be updated.

biggie101
06-09-2006, 03:47 PM
thanks. I've got the external file loading, but now I need to learn how to format the text... i've seen ideas of using CSS, but those aren't linking to a .txt

the code i'm using right now:

myData = new LoadVars();
myData.onLoad = function(){
text1_txt.html = this.content;
};

myData.load("example1.txt");


stop();

(the variable "content" links this file to the .txt
so in "example1.txt" the very first thing you find is "content=hi there i am...")


my textarea is set to accept html as well.... so that's not where my problem lies..

what I have found strange about this is that some tags work in the .txt and not others... and the outcomes are varied..

or instance... if I was to use the <strong> tag to bold a piece of text, when I run the .swf, the tag isn't recognized and it acts as if it wasn't even there. Now if I use a <b> tag, it'll bold the nested text perfectly.

All fine and dandy there.... but if i was to use something like a <font> tag.. the .swf won't print out anything from the start of the tag, down.

any ideas?