Solved

action script, reading an exteranl text file into flash

Posted on 2011-02-25
2
343 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

773 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