Solved

syntax error pulling external text into action script 3

Posted on 2010-08-20
5
413 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
  • 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

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 …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now