Jump to content
Search Community

Apollo13 Themes

Members
  • Posts

    2
  • Joined

  • Last visited

Apollo13 Themes's Achievements

2

Reputation

  1. Hello again. Thanks for both answers. I didn't know about autoRemoveChildren. However i tried clear() earlier and it didn't work for me. Strangely it works now fine! Must be my mistake. Thanks once again for quick help, and have a nice day!
  2. Hello:-) I wanted to know is there any way to reuse same timeline to animate to random points at each replay? On each event I would like to make some animation that has mid animation random each time. This is what I came with(simplified code): var tl = new TimelineLite(), element = $('#element'); function onEvent(){ tl.kill(); //I don't know if this best way to clear whole time line tl = new TimelineLite(); var rotation = randomInt(-45,45); tl .to(element, 0.6, {rotation: rotation }) .to(element, 0.2, {autoAlpha:0}); } //I have other animation that returns it to start points on different event So in this animation element is rotated by different number each time event occurs and then hidden. Different animation returns it to start points. I wonder if I can achieve same thing without creating new timeline each time. And if this is not possible, could you tell me if this is most efficient way of doing things and I wont use all memory after while ? With kind regards.
×
×
  • Create New...