Solved

syntax error pulling external text into action script 3

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

685 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