Jump to content
Search Community

_getChildrenOf throws error

Hippiesvin test
Moderator Tag

Recommended Posts

Hi Greensock

 

I'm working on a project where it's essential that all things are loaded correctly.

If they are not I clean up my fla and in that process I call killAll(); and get following error:

 

 

CleanUp -> ERROR TweenMax -> TypeError: Error #1009: Cannot access a property or method of a null object reference.

at com.greensock::TweenMax$/_getChildrenOf()

at com.greensock::TweenMax$/getAllTweens()

at com.greensock::TweenMax$/killAll()

 

Additional traces (traced just before error thrown):

 

TweenMax : [class TweenMax]

TweenMax.getAllTweens.length : 1

 

Error is ONLY thrown when no Tweens has been running.

 

Is there anyway I can avoid this error? ... and what causes it?

Can I make some kind of an if (TweenMax Contains Tweens) ...-> killAll()...?

 

... and by the way...CONGRATS ON VERS. 12 :)

 

Best regards HippieSvin

Link to comment
Share on other sites

Hi Jack

Her is a link to the projectfiles for my latest post about error in onCompleteListener but this one also throws error as described above.

I've just changed TweenMax file to beta 5.3 from 5.5.

As I see it the only difference in protected static function _getChildrenOf(...

is that in 5.5 U added:

 

if (timeline == null) {

return [];

}

 

Both files are found in classes folder.

All other files are downloaded as 5.5.

You can at the same time see onCompletelistener error. So 2 for 1 ;)

 

http://dl.dropbox.co...eteListener.zip

 

// HippieSvin

Link to comment
Share on other sites

Aha, I see the problem now - thanks for posting the example. Super helpful. The issue had to do with the fact that you were calling TweenMax.killAll() before having ever created a single tween. The root timelines are created (in the AS3 version at least) when the first tween instance is created. Anyway, the latest version works around that so we're good-to-go. Thanks again.

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.
×
×
  • Create New...