Instantly share code, notes, and snippets.

What would you like to do?
start = function() {
all my framer code
preloadImages = ["a.png", "b.png"];
preloadImagesCount = 0; // How many images were loaded {
var imageLayer = new Layer({image:image})
imageLayer.on("load", function() {
preloadImagesCount++; // Add one to loaded images
if (preloadImagesCount == preloadImages.length) {
// Run Framer code if all are loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment