Jump to content


Error when loading

Recommended Posts

I setup my new LoaderMax in a custom display class that gets added to the stage. When I remove that class and then try to create it again and add it to the stage I get an error when _queue is created again.


So the second time around that queue gets created it throws an error.



TypeError: Error #1009: Cannot access a property or method of a null object reference.

at com.greensock.loading.core::LoaderCore()[/users/name/Flash/source/com/greensock/loading/core/LoaderCore.as]


_queue = new LoaderMax({name:"videoQueue", requireWithRoot:this, maxConnections:1, onProgress:videoProgress, onChildComplete:completeHandler});


Anyone know why this is happening second time around.

Link to comment
Share on other sites

Yep, that's caused by the fact that you're not setting the requireWithRoot to an actual root (you should use this.root, not this). LoaderCore uses the object's loaderInfo.url in its name to make it easier to identify, but since your object wasn't a root and it wasn't in the display list, its loaderInfo property was null. However, I just updated LoaderCore to work around that issue and avoid the error in this case. I'd still recommend using the actual root, but if you update to the latest version it should work either way.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.