Solved

syntax error pulling external text into action script 3

Posted on 2010-08-20
5
417 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

717 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