Created
June 4, 2014 08:01
-
-
Save koenbok/f9392438027828b4130f 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() { | |
all my framer code | |
} | |
preloadImages = ["a.png", "b.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 are loaded | |
start(); | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment