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

What is Framer? Join the Community
Return to index
Guillermo Romero Jr
Posted Nov 23 - Read on Facebook

Module Question hype
Sooo I have two modules I've made. Let's say, 1 and 2. Can functions in module 1 communicate with functions in module 2 by both being required in Main? So far, I've been able to get functions in 1 and 2 to work independently, but I can't seem to get them to talk to each other.

13 Comments

Jordan Robert Dobson

No. Well yes. But not easily or sensibly?

What you would want is to include in one module the other module.

You can also include it in main as well.

Guillermo Romero Jr

I tried including 2 into 1 and when an event gets triggered from 1, the stuff from 2 never kicks in. Here is the event. "modInv" is the module I included in 1

Jordan Robert Dobson

How did you include it?

Jordan Robert Dobson

You have to attach it to a var just like in framer. Looks like you're super close.

Guillermo Romero Jr

Hrmm I don't know what you mean by a bar. Can you please elaborate?

Jordan Robert Dobson

Inside module one...

print modInv

right after that line in the image and you get what?

Guillermo Romero Jr

I get a long list of stored variables and layers from the second module

Jordan Robert Dobson

So it def sees it.

Jordan Robert Dobson

So then I'm wondering what happens if you print inside that onTap

Guillermo Romero Jr

It had the same effect, but nothing else popped up, which makes me think it's a layering issue. Time to investigate!

Guillermo Romero Jr

maybe #1 is drawing over #2. I'm thinking #2's functions are going off, but I'm just not seeing it because there is stuff on top of it

Guillermo Romero Jr

It worked!

Guillermo Romero Jr

Thanks for your help Jordan!

Read the entire post on Facebook