I get the JSON info to the EdgeAnimate Stage (creationComplete Action) by this code:
$.getJSON('myJsonLink', function(data) {
});
Problem: the composition get's the info, after the animation starts. But the info needs to be loaded before animation.
it's very annoying problem for which I can't find the solution for days... Can You help?
The getJSON
fires an XMLHttpRequest in an asynchronous mode, which means a request is sent, then we move on to the next iteration in the flow.
You may need to make your request synchronous instead, but unfortunatelly, getJSON
does not support synch mode as far as I know so you should use the low-level $.ajax()
method with the async property set to false
:
$.ajax({
dataType: "json",
url: "myJsonLink",
data: data,
async: false,
success: function () {}
});