Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

syntax error pulling external text into action script 3

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
teenaw
Asked:
teenaw
  • 3
  • 2
2 Solutions
 
blue-genieCommented:
looks like you copied and pasted that code from somewhere

("test.txt"));  the "" 
0
 
teenawAuthor Commented:
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
 
teenawAuthor Commented:
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
 
blue-genieCommented:
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
 
teenawAuthor Commented:
Thanks Blue!  That was it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now