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

What is Framer? Join the Community
Return to index
Rafael Puyana
Posted Dec 04 - Read on Facebook

Quick help here guys. I am creating an interval in one function and want to clear it from another one. What I am doing is not working. Can anyone give me a clue.


Mike Feldstein

IntervalName is locally scoped in each function. Short answer: put IntervalName = null at the top of your file. Long answer, when you define a variable (like InteralName) inside of a function, it is only available inside that function. If you want it to be available everywhere you need to define it globally. Look up how scoping works with local variables in coffeescript.

Mike Feldstein

also im not sure why you're setting an interval to clear the interval.

Rafael Puyana

Mike thanks so much. I am now clear about the scope of the variables within the functions. About that last comment you are totally right. Thanks for pointing out the mistake.

Read the entire post on Facebook