Last active
August 29, 2015 14:02
-
-
Save moaazsidat/4c7bd7bc1fa92c2288f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start = function() { | |
framer code | |
} | |
preloadImages = ["img1.png", "img2.png"]; | |
preloadImagesCount = 0; // How many images were loaded | |
preloadImages.map(function(image) { | |
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 images are loaded | |
start(); | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment