Solved

syntax error pulling external text into action script 3

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
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…

758 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

22 Experts available now in Live!

Get 1:1 Help Now