I have text being loaded into a text field from a .txt file outside the movie..... Everything is working well.... however, I cannot seem to formate the text in any usefull fashion nor create hot link text .... can anyone help with this?
You need to set your text field to html text and then in your text file use the a href="blah blah" as normal.
Open up the reference window and look in the index under html text to see the limted HTML formatting you can do.
When you say "format the text in any useful fashion", what do you mean by that? You won't be able to kern the text but you can use normal html formatting tags like bold, italic and even color tags.
Good Luck!
Antibody
"Our deepest fear is not that we are inadequate.
Our deepest fear is that we are powerful beyond measure." - N. Mandela
Hmmmmm,, I tried your'alls advice,,,but still no dice....
the <> html button is on....everything is loading into the text field as it should, but... I'm getting
<a href="info@bluegelmedia.com>email</a>
instead of
"email" as a hot link.......
I had to use the following code to allow the dynamically loaded text to be scrollable..... do you see anything in the code which could be causing the trouble?
hometext = new LoadVars();
hometext.load("content.txt");
hometext.onLoad = function(success) {
_root.contentbox.text = this.homepage;
};
// this code allows html formatiing
contentbox.html = true;
contentbox.htmlText = this.var1;
Can you attach your textfile? or a textfile that shows a sample of how you are formatting your text in it? I will try to take a look at it as soon as I can.
Thanks.
Antibody
"Our deepest fear is not that we are inadequate.
Our deepest fear is that we are powerful beyond measure." - N. Mandela
Here is the .txt file.I've also attached the .txt file..... thanks for checking it out...
&homepage=Home Page - place you home page text here.
Remember! All you have to do is type your content into a simple .txt file provided as part of your template purchase. No need to go off buying an HTML editor or learning Flash.
This is the quickest, easiest and most inexpensive way you can get a web site.
Have it up within minutes.
&about=About Us Page - place your about us content here
&services=Services Page - place your services content here.
&links=Links Page - place your links content here.
&contact=Contact Page - place your contact information here. Email <a href="info@bluegelmedia.com>info@bluegelmedia.com</a>
&moto=Your company's slogan here....... tell them what you stand for!
Just so I could see the "contact" var do something (which by the way is the only thing in your text file that has html tags in it).
I then placed a dynamic text field on the stage with the name "contact" and made sure that the <> was selected in the text field property box.
I had to make some changes in your text file as well. You were missing the end quote in the url in the href tag so I added that, as well as the underline opening and closing tags. This is done because Flash doesn't inherently underline hyperlinks, so you have to do it manually.
This should head you in the right direction. I am not sure how your movie was setup so I can't tell you why you were getting an error but I think it might be because the code in your post above was pointing to your var "homepage", yet homepage doesn't have any html tags in it. If you want me to look at your actual .fla, post that too and I can take a look.
Good Luck!
Antibody
"Our deepest fear is not that we are inadequate.
Our deepest fear is that we are powerful beyond measure." - N. Mandela
I'm having trouble with coding my href's for Flash and was wondering if one of you guys can help me out. When I created my dynamic text field (with html enabled) I can format my text with ease. I've loaded external text files that were coded using styles and I've done it in the Actionscript window without laoding any files but I've never been able to get my link rollovers to work. Where do you place the Hover, Link, and Visited code in Flash and/or the external txt file; what would it look like?
You will have to use Actionscript to change states on your rollover. Flash doesn't inherently make your links act like the a href tags on an html page.
My suggestion is to open up the Reference guide (Shift-F1) and go to OBJECTS>>>MOVIE>>>TEXTFORMAT. This is how you will need to make your hyperlinks have activity. You can probably make visited links stay highlighted for the duration of a user's visit, but those "already visited" sites won't be lit on subsequent visits, unless of course you save a cookie or otherwise plan for it.
I am swamped at work today so I'm not able to provide any code examples at the moment. I will see if I can get to it a little later. Check out the TEXTFORMAT object in the mean time. I'm sure you can figure it out.
Good Luck!
Antibody
"Our deepest fear is not that we are inadequate.
Our deepest fear is that we are powerful beyond measure." - N. Mandela