We help IT Professionals succeed at work.

actionscript error on website

Last Modified: 2013-11-12

My website is getting this error message when I click on the "about me" tab:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: data/about.txt
      at main_fla::MainTimeline/createTextPage()
      at main_fla::MainTimeline/openPage()
      at main_fla::MainTimeline/clickMenuBtn()

see: http://www.shannon-rae.com

my image and text don't show up at all, and the whole thing freezes! It works perfectly when opened as a file off my computer, though

I've added code where I think the problem might be, but if you need to see another part of it just let me know

4493494939692//===================== create text page =======================//
var decelerationScroll:Number = 4;
var coeffMouseStep:Number = 2;
var btnStep:Number = 4;
var _scrollContent:MovieClip = new MovieClip(); 
var _txtPage:TextField = new TextField();
	_txtPage.name = "_txtPage";
	_txtPage.autoSize = TextFieldAutoSize.LEFT;
	_txtPage.multiline = true;
	_txtPage.wordWrap = true;
	_txtPage.embedFonts = true;
var formatTxtPage:TextFormat = new TextFormat();
	formatTxtPage.font = "standard 07_56";
	formatTxtPage.color = 0xFFFFFF;
	formatTxtPage.size = 8;
_txtPage.defaultTextFormat = formatTxtPage; 
var scrollW:uint;
var scrollX:uint = titleSiteStartX;
var scrollY:uint = barMinH + titleSiteStartX;
var scrollH:uint = barMaxH - scrollY - 55;
function setSizeScroll():void{
	var _firstbtnMenu:MovieClip = _menuContainer.getChildByName("btn1") as MovieClip; 
	scrollW = Math.floor(_menuContainer.x + _firstbtnMenu.width - 30);
	_txtPage.width = scrollW;
function removeScrollText(_spriteCont:Sprite, _nameScroll:String):void{
	var _curentSctollText:Scroll =  _spriteCont.getChildByName(_nameScroll) as Scroll;
	_curentSctollText = null;
function createTextPage(_linkTxt:String):void{
	var loaderPageData:URLLoader = new URLLoader();
	loaderPageData.addEventListener(Event.COMPLETE, onCompletePageData, false, 0, true);
	loaderPageData.addEventListener(ProgressEvent.PROGRESS, progressLoadedPageData, false, 0, true);
	loaderPageData.load(new URLRequest("data/about.txt"));
	function onCompletePageData(evt:Event):void {
		try {
			_txtPage.htmlText = evt.target.data;
			var scrollTextPage:Scroll = new Scroll(stage, _scrollContent, scrollW, scrollH, decelerationScroll, coeffMouseStep, btnStep);
			scrollTextPage.name = "scrollTextPage";
			scrollTextPage.x = scrollX;
			scrollTextPage.y = scrollY;
			scrollTextPage.setButtonsPosition(scrollW-40, scrollH, scrollW-25, scrollH);
			loaderPageData.removeEventListener(Event.COMPLETE, onCompletePageData);
			loaderPageData.removeEventListener(ProgressEvent.PROGRESS, progressLoadedPageData);
		} catch (err:TypeError) {
			trace("Could not parse loaded content as XML:\n" + err.message);
	function progressLoadedPageData(evt:ProgressEvent):void{
		var percent:Number = Math.round(evt.bytesLoaded / evt.bytesTotal * 100);
		_txtPage.text = "LOADING PAGE DATA " + percent + "%";

Open in new window

Watch Question

Top Expert 2009

the URL  you provided doesn't work.
an IO error means it can't find the about.txt file inside the data folder.


sorry! I was missing a 0 in my nameservers. It works now (although it's painfully slow on my computer. Does that have something to do with my hosting provider maybe?)
the .txt file is definitely there and in the same location as it is on my computer... I reloaded the entire thing just in case, but it still doesn't work online
Top Expert 2009

okay your data/about.txt file location must be relative to the html file NOT the swf.
Is that correct?
Top Expert 2009

there are subsequent errors as well about stage resize.


I'm pretty sure the .txt file is being called straight into the swf, so I don't think the html references it at all... and I basically copy/pasted the folder containing the website from my computer to filezilla, so I would guess the locations would be the same, but where should I look to check and make sure?

what are the stage resize errors? I bought it as a template, so I'm not sure how it works, but I can paste some of the actionscript if you want to see that?
Top Expert 2009

no what i mean is not that the html calls the .txt file, but once a swf is running inside a parent (i.e. html / php) that parent becomes the point to which you need to reference external object like text files you're loading.
Top Expert 2009

resize your browser (click continue on first error)

TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at main_fla::MainTimeline/onResizeStage()


ok, so that's something I need to change in the .fla, correct? should it be calling for index/data/about.txt instead of data/about.txt?

and the resize problem doesn't happen until after the first error, so once we fix the first one the second won't happen anymore, right?


the .txt file works when index is opened in a web browser straight off my computer- I wouldn't think it makes a difference, but should I put the name of the folder containing everything somewhere too? on my computer it's in a folder called "website 3.0" but online it's put into a folder called "public_html." If I change the name on my computer to public_html and upload it again will it make a difference?

sorry I'm so new at this :S...
Top Expert 2009

i didn't understand your last post.

in your public_html if you want your website to default to that index page then you'll put the stuff in the root folder

in terms of fixing one problem and that automatically fixing the Stage resize problem - sorry no such luck.

the null object reference happens first because you try to load a file and it tells you it can't find it.
then you resize your stage and then that error happens. 2 seperate issues.


sorry, I'm just confused as to why the index file works when opened in firefox from my computer, but once the same files are uploaded to the internet it doesn't anymore. If I possibly gave you a temporary password to my hosting service so you could see the files, would it help? or is that against the rules?

Thanks so much for your help, I really appreciate it by the way!!
Top Expert 2009

show me the file structure in your public html folder on your server, just list it.

then the stage error is another issue.


__AC RunActiveContent.js
___(images & thumbs in portrait gallery)
___(landscape gallery)
___(traditional gallery)
_animated favicon.gif
Top Expert 2009

ok wait holdon.

change these 2 lines of code in your createTextPage function

     loaderPageData.addEventListener(Event.COMPLETE, onCompletePageData, false, 0, true);
        loaderPageData.addEventListener(ProgressEvent.PROGRESS, progressLoadedPageData, false, 0, true);


     loaderPageData.addEventListener(Event.COMPLETE, onCompletePageData);
        loaderPageData.addEventListener(ProgressEvent.PROGRESS, progressLoadedPageData);

test it on your live server - what happens

you're using code their for AIR API


OK, it's changed & uploaded

it still doesn't work, but I didn't get any error messages this time, so that's a good thing. I'm on a different computer though, so you might want to check for yourself too :)
Top Expert 2009

i've cleared my cache and i still get that error.
will look again later need to finish stuff for a client today.
Top Expert 2009

Hello flashhelpplz, I still face the error on the website like blue-genie. I went to http://www.shannon-rae.com/data/about.txt and it gives me a blank page. Is it supposed to be blank?

Try adding an ioErrorHandler and see what you get.

loaderPageData.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

private function ioErrorHandler(event:IOErrorEvent):void {
            trace("ioErrorHandler: " + event);

It's either my internet is screwy but it doesn't seem so but your about.txt is just blank. Maybe that's the reason you are getting this error.

OK I tried using a download manager to download your about.txt and get a 404 error. Did you remove your about.txt? Because I can still access cgal.xml in the data folder.
Top Expert 2009

Oops I am sorry if yours is timeline code please remove the private access modifier.


wow! that is very strange that the .txt file isn't showing up at all! I promise the file is there, I just downloaded it off my server and checked it and it's fine, but I don't understand why it can't be seen from a browser. my computer is just rerouting to my server's homepage if I try to type in the file address, and I guess it isn't showing me errors either... I'll try on the library computers tomorrow.

I'm sorry, I don't know much about actionscript or how this website is built. I bought it and there's no way of getting in contact with it's creator.

I'm not sure where to add your error handler. tried adding it in the beginning (after the loaders & before the gallery) but it didn't seem to be doing anything.
Top Expert 2009

loaderPageData.addEventListener(ProgressEvent.PROGRESS, progressLoadedPageData);

You originally have some code similar to this, then blue-genie asked you to edit into this code. So you place these two functions below.

loaderPageData.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

function ioErrorHandler(event:IOErrorEvent):void {
            trace("ioErrorHandler: " + event);


Originally you can see the error but now you can't, that's pretty weird, if you know how, try to get the debug flash player and try. You should see errors. All what I show you is simply handle the error.

It's pretty weird why the file can't be seen, there may be some configuration problems there. So you might want to contact your web administrator to help you with that issue. Once data/about.txt can be seen from the browser, you shouldn't be getting any problems.

Alternatively, you might want to upload your about.txt on your root folder instead and change loaderPageData.load(new URLRequest("data/about.txt"));
loaderPageData.load(new URLRequest("about.txt"));.

Then tell me what you get. I can assure you it's the problem with the configuration of your site and not the problem with the actionscript since you say that about.txt definitely exists in the data folder.


I just spent the last 5 hours re-doing the whole thing from the beginning (in case I made a mistake somewhere). Once again, it works perfectly on my computer, but the txt file still isn't working when it's uploaded! I tried moving it to the root folder and changing the .fla to look there instead, but it caused a lot more glitches.
You have no idea how close this computer came to being thrown into the parking lot.
Anyway, now you can see all the files I have up there and how they're arranged so I really hope that helps!! The txt file is still not showing up, but I promise it's not blank!!
ps the "fonts" folder is new b/c I thought it might have needed it there, but I don't think it was the problem. Everything in the "flash_new" folder was straight in "public_html"
Top Expert 2009

I see your data.txt there but I just keep getting a 404 error from it. I know it shouldn't have errors if you make the swf look for the about.txt from the root folder but that doesn't matter. I have a simpler idea for you that you might want to try out.

Try uploading a new about.txt with a different name like about1.txt, do not rename the about.txt to that. Upload a new copy of about.txt as about1.txt.

Then modify your code to load from data/about1.txt instead from data/about.txt.

It works perfectly on your computer because you can view the .txt file perfectly, but when uploaded, it seems there's a problem with about.txt. I know there should be things in it, but it seems that the server know there's a file but couldn't find the data in it.

Which means that once you load about.txt, the server know it exists but couldn't find the data in it. Thus it returns a blank page. A download manager does not use the same way of how a browser look for a page thus returns a 404 error which means that your about.txt actually  does not exist.

So try what I just said first and tell me what you get.


OK, I uploaded about1.txt, which is a copy of the original txt file that came with the site when I bought it (not edited at all, in case I accidentally did something that's making it read wrong), but it's showing up blank too. I also created about2.txt straight from the website as a new file, and about3.txt without any formatting at all (just text) and they all show up blank. I submitted a ticket with 000webhost about it and it said i should have a response in 24hrs...

i attached the text file so you can look at it and see if there's anything in it that would make it unreadable by a server. Are symbols OK? I had $ and @ and - signs in the first one...

happy thanksgiving!!

Top Expert 2009
This one is on us!
(Get your first solution completely free - no credit card required)


It's their fault!!!! They have .txt files DISABLED. I wish I had known that 4 weeks ago. I'm so annoyed!! What kind of web host has txt files disabled???

So I changed it to an html and everything finally works the way it's supposed to

You deserve the points for helping me try to fix my dead-end problem. Thank you SO much for all your help!!
Top Expert 2009

Exactly. This is the first web host I ever saw that have .txt files disabled, it's great that you have your website working now :)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.