Copy link to clipboard
Copied
Can Anyone help me speed this up. Starting to think it is the Nature of Jquery and not Animate.
var tl = this
$.get("https://give.benevolentenabler.com/api/custom/totals/1", function (data) {
var txt = tl.theTime;
var fill = canvas.getContext("2d").createLinearGradient(7, 0, 0, txt.getBounds().height);
fill.addColorStop(0, "#FFFFFF");
//fill.addColorStop(0.5, "#0F0");
fill.addColorStop(1, "#ffd800");
txt.color = fill;
txt.text = "$" + data.raised;
if (!data.raised.length) {
tl.gotoAndPlay('Slide2');
}
})
.fail(function (e) {
alert("BROKEN");
tl.gotoAndStop('Slide2');
});
tl.stop();
there's going to be an unavoidable delay. for me that's less than 1 second but it depends on a user's connection.
if any delay is unacceptalbe, display something acceptable while waiting for the json to load.
Copy link to clipboard
Copied
i don't see any significant delay.
Copy link to clipboard
Copied
People I am working with do not like that it shows frame one's background then loads the dynamic content about a second later. This will be used in an ad rotation where each ad only gets 8 seconds before the next ad shows. They do not want to waste a second.
Copy link to clipboard
Copied
The code just to load some JSON is trivial. If you're seeing a significant delay, it's because your server and/or network connection is slow.
Copy link to clipboard
Copied
there's going to be an unavoidable delay. for me that's less than 1 second but it depends on a user's connection.
if any delay is unacceptalbe, display something acceptable while waiting for the json to load.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now