Solved

syntax error pulling external text into action script 3

Posted on 2010-08-20
5
416 Views
Last Modified: 2013-11-12
I am encountering a syntax error pulling faqLoader.txt into a TextArea instance named faqLoader in AS3.  Here's the script I used:



Any suggestions appreciated.
var faqLoader:URLLoader = new URLLoader();  
faqLoader.load(new URLRequest(”test.txt”));   
faqLoader.addEventListener(Event.COMPLETE, onComplete);
function onComplete (event:Event):void 
{  
var faq:String = event.target.data; 
external_faq.text += faq; 
};

Open in new window

0
Comment
Question by:teenaw
[X]
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
  • 3
  • 2
5 Comments
 
LVL 39

Assisted Solution

by:blue-genie
blue-genie earned 125 total points
ID: 33488468
looks like you copied and pasted that code from somewhere

("test.txt"));  the "" 
0
 

Author Comment

by:teenaw
ID: 33489292
I don't understand your reference to: ("test.txt"));  the "" 

The code is from the tutorial at http://www.dreamincode.net/forums/topic/53499-load-external-text-in-flash-cs3/
0
 

Author Comment

by:teenaw
ID: 33489304
The whole code is from the tutoria, I dod wonder about the reference to test.txt when the instructions were to create a text file named external_faq.txt
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 125 total points
ID: 33490577
no dude, i'm referring to the quotes around the test.txt

of course the name of the file should be whatever you want it to be.

just change the quotes i.e retype the quotes, instead of what you copy and pasted
0
 

Author Comment

by:teenaw
ID: 33497052
Thanks Blue!  That was it.
0

Featured Post

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

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,…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

734 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