I can help you out with the changing text, and the fact that it’ll be made into a projector (I assume you mean into an exe?) shouldn’t matter cause it should still call those text files, which we’ll be loading. Alright, let’s start this out. We have a text “area” (which is just a <b>dynamic text box</b>) so now we set the variable (you can find it in the properties panel after you click on the text box) to something like <b>_root.currentText</b> (I like that name because I find that going back and looking at my old flas becomes less confusing with names like that). Okay! Now, whenever we change the variable <b>_root.currentText</b> the text box will automatically update it. Nice, right? Next, you’ve got a choice. You can either load <B>4 different text files</B> or you can load <B>1 text file</B>. If you’re still new to stuff, I’d say stick to the four text files. So, we’ll start with that method.
<B>METHOD 1: “simple’s always good”</B>
Let’s click on the <b>first</b> button (with the following code):
on(release)
{
//let's load ALL the variables from
//the text file into the _root
loadVariablesNum("theFirstTextFile.txt", 0);
}
Now, in our text file we have the following variable…
¤tText=Entry number 1. Wow, loading text is fun.&
WAIT! Wasn’t currentText the name of the variable we set for the text box? Yes, it is, since we loaded the variables into the root (so you’d access that one by _root.currentText). So, you clicked the button and the text loaded. Good. So, now we do the same thing for your other four or five other text files. You’ll only be changing the file that’s being loaded (on the different buttons), the file name (of the text file, that is), and that’s it. Great! That was easy.
METHOD 2: “we like complexity”
Well, maybe you just want one text file. So, let’s set that up first. Make a text file (let’s call it entries.txt). Now, let’s put the following stuff in it:
&entry1=First entry!&
&entry2=Second entry!&
&entry3=Third entry!&
&entry4=Fourth entry!&
Good. On the first frame of the entire movie, let’s load the text file.
loadVariablesNum("entries.txt",0);
Now, let’s work on the button code…So, first one…
on(release)
{
_root.currentText=_root.entry1;
}
Then you go on to the second button and just change which entry is loaded, understand? Cool, that was simple.
<B>CONCLUSION</B>
In both methods we are basically telling flash that the dynamic text variable _root.currentText is something, and it updates it for us. That’s it. Now, if you wanted to do something cool with the text box (like a transition effect), I’d find a movieclip prototype function that fades stuff. First, put your text box into a movieclip (if you haven’t already) and give it an instance name. Let’s pretend that it is called “fade();”…On each button, you’d have a call to fade like “instanceNameOfMCWithTextBox.fade();” Cool stuff, right?
Understand everything, okay? Good.
Later,
–Elios
P.S. Don’t double post.