

It carries a text property that describes the nature of the error, as seen in the errors we created in the first step both code snippets produced Error 2044, but the text of each was different (even though it was semantically the same). This is a specialized event for cases such as this. When a Loader or URLLoader encounters a failure, such as described in the previous step, it will dispatch an IOErrorEvent.IO_ERROR event.

If you’re reading this, though, you might not realize that these loading classes also dispatch other events, notably the IOErrorEvent.IO_ERROR event. You need to utilize the Event.COMPLETE event in order to know when a load is ready for you to work with it. Error 2044 is accusing you of not being prepared for when that happens.īoth Loader and URLLoader are event dispatchers, as you should know from working with them. We can’t control the network, so a load failure is bound to happen at some point. However, Error 2044 is not accusing you loading a bad file. Most likely it’s a case of the file being unreachable this might simply be a mis-spelled URL, or a URL being created dynamically resulting in a bad location, or because the server or network is down at the moment. As the fake URL in my code snippets would suggest, the file we are trying to load is having a problem of some sort. In fact, the error has something to do with the failure to load an external file. URL: file:////Volumes/Mac%20Pro/Users/dru/Library/Caches/TemporaryItems/non-existant.urlĪs you might be able to surmise from the fact that Error 2044 crops up with Loader and URLLoader in use, this error has something to do with the loading of external files.
