• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • 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

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

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