Jump to content
Search Community

TimelineMax remove strange behavior

beamish test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I've set up another question with a pen to make things clearer, please refer to it: http://greensock.com/forums/topic/11859-nested-timelines/

Thanks.

------------

Hi,

 

I have a strange situation where 'remove' on a TimelineMax seems to work but then not... :  

 

1. There a TimelineMax instance to which I add several nested timelines

2. The TimelineMax works well

3.  I remove one of the nested timelines using the 'remove' method on the TimelineMax with the nested timeline as the paramater.

4.  The nested timeline is not removed.

 

When I debug the code with a single nested timeline, I can see that if I set a breakpoint at the 'remove' line, then before the 'remove' is called if I call 'getChildren' on the TimelineMax then I can see some items; after the 'remove' is called if I call the 'getChildren' again then I get an empty array (as should be), but now if I single-step in the debugger one line forward and then call 'getChildren' then the array is 'magically' filled up again with the timeline I just removed...  There are no events that add nested timelines that are called in this situation.

 

I should note that I don't want to kill the nested timeline because I want to run it separately or add it to another instance of TimelineMax.

 

Any ideas?...

 

Thanks !

 

Elior

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...