View Full Version : Preloader error: access of undefined...

02-22-2010, 03:05 AM
Hello, I am currently having some trouble.

I am getting these errors when I try to play my flash thing I made:


These are errors from a pre-loader I am trying to add with dynamic text saying "Loading Config - 50%" The percentage changes.

The text has the instance name: loadText

Also, in the background a rectangle fills up, something like this:


The background half loaded filled red rectangle has the instance name: loadBar

And it seems to not be working, this is the actionscript 3 I have on the first frame:

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
this.loadBar._width = getPercent * 100;
this.loadText = "Loading Config2 - " + Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total)
} // end if

If anyone needs the FLA source to make it work, I will be able to give it to you. You may not even need it to make it work.

[Paul Ferrie ]
02-22-2010, 09:52 AM
If you set the AS version to '2' then it will work fine.

02-22-2010, 09:20 PM
The rest of my coding is in as3...

Can someone show me how i can convert this coding to as3 or post a converted version of

Thank You.

[Paul Ferrie ]
02-23-2010, 08:38 AM
Flash preloader, from AS2 to AS3 (http://www.scotflash.co.uk/blog/?p=8)