This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Amy Casillas
Posted Jan 09 - Read on Facebook

Is there an event I can listen for that tells when all items have been initialized and displayed on screen? I have an opening animation, but it is starting before everything is completely ready.

4 Comments

Benjamin Den Boer

Hey Amy, you could try a few things:
1. Utils.domComplete -> print "Ready!"
2. Utils.delay 0.5, -> ... (timed)
3. If videoLayers are causing the delay, you can listen to the canplay or canplaythrough events: http://www.w3schools.com/tags/av_event_canplay.asp

Amy Casillas

Thanks Benjamin. I'll try this. It isn't a video layer, it's a series of layers containing Sketch images that take a while to load the first time through.

Koen Bok

You can use the "load" event on images.

Amy Casillas

Why can't I find Utils.domComplete in the documentation? Is there an example of it in use somewhere?

Read the entire post on Facebook