School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

 

Code Snippets

  

ActionScript Source Code


Welcome to Dream.In.Code
Become an Expert!

Join 340,149 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 3,872 people online right now. Registration is fast and FREE... Join Now!




Load external text

title says it all :D

Submitted By: reyco1
Actions:
Rating:
Views: 22,281

Language: ActionScript

Last Modified: March 27, 2005
Instructions: instructions in the AS code.

Snippet


  1. myLoadVar = new LoadVars();
  2. //place full path of where the text file is located where it says
  3. //"text file goes here"
  4. myLoadVar.load("text file goes here");
  5. myLoadVar.onLoad = function(success) {
  6.      if (success == true) {
  7.           // place the instance name of the text area
  8.           // where it says "urMC" and replace "VARIABLE"
  9.           //with the variable name inside the text file.
  10.           //For example, in your text file you have something
  11.           //like: message = "hello world"... "hello world"
  12.           //will be displayed in flash.
  13.           urMC.text = myLoadVar.VARIABLE;
  14.      }
  15. };

Copy & Paste


Comments

There are currently no comments for this snippet. Be the first to comment!

Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month