0

I am working on a project, which consists of a slider with 9 slides, where each slide has an edge animation. I already created a script which loads animations in dynamically when you actually land on a particular slide. i did this to avoid loading everything at once. This works fine. However, the issue is that once all 9 animations are in, things start to slow down dramatically.

What I would like to do, is to kill the animation once I leave a corresponding slide and then load it in again, when I come back on to the slide.

The animations are quite complex with symbols being created dynamically and deleting themselves, so I cannot simply stop at 0 on the stage. I have to kill it completely.

If anyone knows a way, I would really appreciate it.

Thanks.

Web_Designer
  • 72,308
  • 93
  • 206
  • 262
AntonP
  • 3
  • 2
  • Well, I have managed to instead stop animations via edge javascript api and restart them, when you get back to a corresponding slide. The speed is no longer an issue. – AntonP May 01 '14 at 11:15

1 Answers1

0

Take a look on this question.

Basically you have to modify some file, especially *_edge.js, where you have to bind your custom event:

$(window).bind('triggerEdgeAnimation', function () {
    Edge.launchComposition(compId);
});

So, somewhere in your code, you can trigger event to start animation:

$("button").on('click', function () {
    $(window).trigger("triggerEdgeAnimation");
});

Anyway, you can find more details in the link.

Community
  • 1
  • 1
Luca Davanzo
  • 21,000
  • 15
  • 120
  • 146