Jump to content


_getChildrenOf throws error

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

Hmmm...very odd...you're using the AS3 version, right? And are you subloading swfs that use an OLDER version of the tweening platform? Or maybe your main swf uses v11 but your subloads use v12?


Does the attached TweenMax file fix the error for you?


Link to comment
Share on other sites

Hi Jack - sorry for late reply, been away for a few days.

Yes your TweenMax file did the job - what happened?

My File:


* VERSION: 12.0 beta 5.3

* DATE: 2012-05-10


Thanks :)

Link to comment
Share on other sites

Interesting. Is there any way you could post an FLA that I could publish to see the error in the older version of TweenMax?

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 ;)




// HippieSvin

Link to comment
Share on other sites

The change was actually in TweenLite, not TweenMax (TweenMax extends TweenLite). Did you update your TweenLite file too?

Link to comment
Share on other sites

Hi Jack - U R hard to keep up with :)

Thought 5.3 was gone but found it - another good reason never to clean up download folder :)

Ok I thought change was made in TweenMax because of what I found described above.

Here is exact same project as before but all classes are 5.3, downloaded 16/5.


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.