action script, reading an exteranl text file into flash

Reading an external (text or png) files into flash.
Who is Participating?
sjklein42Connect With a Mentor Commented:
This is an except from code to read in an image file and display it (at x=123,y=456):

var myImageFileName = 'myimage.png';
var myImage_mc = this.createEmptyMovieClip('myImage', this.getNextHighestDepth());
myImage_mc._x = 123;
myImage_mc._y = 456;

Open in new window

To read a text file into a variable, you can use the LoadVars function.

Here is an extended discussion of all the ways you can do it:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.