PDA

View Full Version : Loading txt file into HTML from a Flash button



ColBalt
19 Sep 2007, 07:52 PM
This forum looks promising. :nod:

I am trying to load a text file into a text box (in Dreamweaver) from a command from a Flash actionscript.

My actionscript:

button1.onRelease = function(success) {
if (success) {
text_box.htmlText = loader.info;
} else {
text_box.text = "error.";
}}
loader.load("Lorem1.txt");

"text_box" is the ID of the text box I want to load the text file into

Is this the right direction? Do I pre-load the file from the Flash file?

I'm not a complete n00b at this. I can usually figure this stuff out, but I'm quite stuck here. Help with my action-scripting and HTML coding would be greatly appreciated.

Cheers

ColBalt
22 Sep 2007, 11:03 AM
Alright, let me make this simpler. forget the flash element.

How do you load different files (text or html or .?. ) into the same text box when clicking on a different buttons?

Or how about...
I know I can do this in flash. Can an action-script in one flash element/file effect the time line of another flash element/file, that are load on the same page?