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

What is Framer? Join the Community
Return to index
Zachary Russell Heineman
Posted May 17 - Read on Facebook

What is the proper way to load external scripts in Framer Studio?


Jason Frank

Hey guys, I'm new to Framer, so I'm probably way off base, but I'm wondering if what Joshua Tucker suggested is really the "proper way" to load external scripts. Doesn't doing it that way place all of that scripts' members into the global namespace?

I just learned that Framer utilizes modules, so isn't that the proper way?

Joshua Tucker

You're asking great questions :). Start by moving the script to the folder location of your choice (best place is the /framer folder inside your Framer project folder – it's where the rest of them are).

Once you've done that, open the index.html file with a code editor (I use Xcode) in the Framer project folder and add the script. I highlighted an example of a script I added for a project a while back.

Jordan Robert Dobson

Joshua Tucker we need to talk. I can't seem to get this working reliably. :/

Stephen Crowley

Jordan Robert Dobson - what's happening? Is it not loading your script at all?

Jordan Robert Dobson

Ha! As I explained earlier to Joshua... It felt like jumping through hoops inside of hoops inside of more hoops.

Stephen Crowley

Pix plz :)

Jordan Robert Dobson

I think I'm going to mock up a simple example to show how I'd like to do the two way communication and see if that helps at all.

Jordan Robert Dobson

My file takes maybe 10 seconds to compile every time right now for pieces of code I never touch anymore.

I hope my example will help.

Stephen Crowley

Feel free to start a group chat with Joshua Tucker and myself and once we find a reasonable solution we can share with the group.

Jordan Robert Dobson


Read the entire post on Facebook