Help with Loading text from External Sources

Whats up yall. Here is my problem. The tutorial that is on this site gives me exactly what i need except for my issue is that i dont use a button for my button i use a movie clip and use scripting to make it work. The problem is is that when i add the script to add the import the text it changes the movie clip into the text. weird i tell yall. how do i target the text box? e-mail me please.

Lukasz@lapdesign.net

Thanks for the help

Can you post your code here?

on (release) {
loadText = new loadVars();
loadText.load(“text1.txt”);
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}

I cant see anything wrong with your code. Can you post your fla?

would you like me to e-mail it to you?

email it to claudiodj at yahoo dot com

you got mail. its a little over 4 mb

just kidding

http://www.lapdesign.net/journees4/topnav2.fla

just click there

[edit] nevermind i got the file

cool

for some reason it wont load the text

Try this code:

on (release) {
	loadText = new loadVars();
	loadText.load("text1.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			_parent.newsBox.html = true;
			_parent.newsBox.htmlText = this.myNews;
		}
	};
}

beautiful!!! it worked. thanks so much

welcome :slight_smile:

Hey Dj Foxx,

Do you know why I can’t add special characters
in the text file? If my text1.txt file has … à or é…
for example… the code gets all messed up.

Any ideas?

Thanks! :crazy:

Neuhaus3000

all about special characters
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=1024&highlight=special+characters

scotty

Hey, thanks Scotty! :beam: