Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

action script, reading an exteranl text file into flash

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

829 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