Loading external text into a attachmovie window

Hello all,

The current project I am working on is: http://www.steadyscene.com/clubaddiction

The owner would like to update the INFO, CONTACT and LINKS sections of the site but does not have Flash. Having the owner edit a text file in notepad and then upload that to the server would be ideal. (I have seen the Kirupa tutorials but they do not satisfy my requirements)

What I want to accomplish seems to fall in the “Loading external text into a flash movie” category.

However, here is my situation and here are my requirements:

  • The text has to be loaded into a attachmovie window. The buttons on the site use attachMovie which snap to an empty mvie clip called “HOLDER”

  • currently on the site, you see that I have created standard Dynamic Text boxes with the instance of “infotxt”. So the instance name needs to stay as it is, unless there is another method that accomplishes the same thing. This is a basic method of scrolling the text box with a button, using simple actionscript:

on (press) {
infotxt.scroll -= 1; }

Currently, when the navigation buttons are clicked, the attachMovie are loaded into the empty mc “holder”. Once the attachMovies are loaded, you see dynamic text fields with buttons to scroll.

Please provide feedback as to what to implement to satisfy my requirements.


I am working on a similar project and am almost done. Let me know what problem exactly you are facing and we can take it from there.

I need to implement it and dont know how

Okie this is the concept, I still dont know what exactly u r looking at since you know what you want so implementation should come with it.

What i have done is created a dynamic text box on the stage and on menu click it loads the html page into the textbox. Word of caution, the formating of the html page will be really different from wht you code from html editor, therefore its suggested that you code in a notepad.
In the html page there are 2 variables. one is the content and then there is a flag to check if scrollbars are need for the page or not.
let me know where exactly you dont know wht to do

I 'd rather not use html. I need the user to edit notepad and have it dynamicaly load into the flash movie. The issues are the attachmovie, the current dynamic text box that I am using.

okie, I still dont get wht is that you are looking for since it seems pretty straight forward but its just a case of my hangover :slight_smile:

In the text file have a variable that has the content for the text box.

When you attach the movie, cal the loadVar method to do the needful

Harp, please read my original post again. I was very specific in what my requirements are. Treat me as if I have no clue what I am doing in Flash Actionscripting, hows that? :slight_smile:

Okie cool, here is a editted extract from my code, go thru it and see if there is anything else you need. I suggest for ur site just create one dynamic text box in the centre and when the buttons are clicked, the respective text gets loaded into it. Does that make sense

function loadText(source){
loadVarsText = new LoadVars();

loadVarsText.onLoad = function (success) {
		//If the data is loaded the text field is assigned the value 
								hostText_txt.htmlText = this.ht;
	//Incase the file is not loaded due to any reason
	hostText_txt.htmlText="<center><br><br><br><br>                      There was an Error in loading the file<br>                      Kindly contact webmaster</center>";


How does this implement into my attachmovies?

I think I am doing the same thing you want to do. If this is not helpful, disregard with my apologies. I set up a .txt file with all my variables for a sales proposal that our secretary just updates to change the flash content. I loaded the external txt file into a blank movieclip off the stage using the loadVariables command:

onClipEvent(enterFrame) {

From there, i put dynamic text boxes all over the proposal with the var names matching teh variables in my txt box. Your owner/client can change his txt variables and everything will update automatically when loaded. Be sure to use the & symbol to seperate everything. I dont know about the attachmovie thing. Hope it helps.


Can you post your fla?

not at this time…big time work in progress. just create a blank movie clip, put it off the stage in frame 1 and attach the script i had above to it with your text file name. Be sure to have the text fiel in the same folder as your .fla file. I got it to work fine.

“just create a blank movie clip, put it off the stage in frame 1”

Can I put that in frame 1 of my INFO movie clip?

When the INFO button is clicked, the INFO movie clip loads… at this point is where I want the external text to display, inside the INFO movie clip.

that is a good question. My next issue in this project is to find a way to load those variables into movie clip layers like you want to do. I am stuck on another problem at the moment (See Wicked Variable Problem thread). Once i clear that hurdle, will work on that. I know you should be able, not sure how. Give it a try and tell me if it works

time is short and my knowledge is shorter. I did it where my dynamic text is all on main timeline so far so not exactly equal to what you want to do. In fact, I am looking to find out how to do the same thing inside a movie clip like INFO. i like to start out easy and get harder. create a new movie adn text file. Give ti one variable and creat a blank mclip and place it off the stage in Frame 1. Attach teh following actionscript to it:

onClipEvent(enterFrame) {

put a Stop() command on frame 1 adn put a dynamic text box with teh var name that matches your txt file. If it works, you’ve got the idea! My fla right now incorporates something like 30 variables. Works pretty good and the secretary cant really goof it up.


create a new movie? or new movie clip? create a blank mclip also? attach the actionscript to the mc? or frame 1?add a dynamic text box to frame 1?

for understanding reasons, make a sample movie was my recommendation. So yes, new movie, with a new blank mclip. Attach the script to the mc, put it off the screen in frame 1. Put stop in frame1. Yes, add dynamic txt box in frame 1. Try and see if imports your var adn displays properly. Once you have that down you can expand from there. That’s what i did.

does that help?

that is another problem. If you find that answer let me know. I think we need to make the variables we imported into _global but not sure how yet…working.

good luck, gotta run