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

What is Framer? Join the Community
Return to index
Kyungsik Yoon
Posted Sep 01 - Read on Facebook

Hello, folks. I am newbie to framerJS from Flash. Is there a way to handle continuous event in framerJS like enterFrame in Flash?

7 Comments

Marcelo Eduardo Oliveira

Not currently, but you can always do your own RequestAnimationFrame loop and go from there :

window.requestAnimFrame = (function(callback) {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
})();

Kyungsik Yoon

Thanks, I will give it a try!

Kevin Cannon

setInterval can also work pretty well, people used that in Flash too!

Koen Bok

Or use the Framer loop:

Framer.Loop.on "update", -> ...

Isa Bison

Is this documented somewhere?

Grace Tingshan Gou

I was trying to use window.setTimeout but the program crashed and didn't response to me, does anyone have some ideas? Thanks!

Isa Bison

See Koen's answer.

Read the entire post on Facebook