Solved

action script, reading an exteranl text file into flash

Posted on 2011-02-25
2
339 Views
Last Modified: 2012-06-27
Reading an external (text or png) files into flash.
0
Comment
Question by:amielDorel
  • 2
2 Comments
 
LVL 16

Accepted Solution

by:
sjklein42 earned 500 total points
ID: 34982502
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;
myImage_mc.loadMovie(myImageFileName);

Open in new window

0
 
LVL 16

Expert Comment

by:sjklein42
ID: 34982525
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:

http://www.actionscript.org/resources/articles/46/2/LoadVariables-and-LoadVars-Objects/Page2.html
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bandwidth 5 64
Need icon art 9 79
Adobe Indesign CS6 4 79
How to create image similar to the attached photo? 10 87
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now