away3d / away3d-core-fp11

Away3D engine for Flash Player 11
http://www.away3d.com
Other
640 stars 273 forks source link

AssetLoader.OnRetrievalFailed overwrites asset URL #724

Open cemkod opened 8 years ago

cemkod commented 8 years ago

In https://github.com/away3d/away3d-core-fp11/blob/dev/src/away3d/loaders/AssetLoader.as line 492:

event = new LoaderEvent(LoaderEvent.LOAD_ERROR, _uri, isDependency, event.message);

while recreating the event to throw to external listener, this line overwrites the correct asset URL with the URL of the main document file. This leaves the external listener unable to know exactly which dependency asset threw an error while loading.

Is there any reason for this behaviour?

I think this should be:

event = new LoaderEvent(LoaderEvent.LOAD_ERROR, event.url, isDependency, event.message);