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

What is Framer? Join the Community
Return to index
Vince Li
Posted Jul 08 - Read on Facebook

Hey guys, I’m wondering how to do the following:

Text layer Blue in the loop gets its text from an array. When you click on one of the blue text layers, text layer Red appears.

Now I want the text value from whatever blue text layer you clicked on, to be passed on the Red one. How does that work?

Thanks in advance!

https://framer.cloud/VrcjF

6 Comments

Bil D Benhamou

Why don't you simply change the color of the "blue" clicked text to red?

Vince Li

Oh sorry, that wasn't clear. I meant the string from the array. So when you click title3, the red text layer also reads title3

Ban Nguyen

do(blue)
blue.onclick ->
red.text = titles[i] or @.text

Haven't tested but that's what I think. Good luck!

陳威威
Vince Li

Thanks Ban Nguyen! But didn't work unfortunately. 陳威威 that did the trick, thanks!

Vince Li

陳威威 follow up question: How can I have the click event on another layer within the loop? So I click on a different layer and then refer to the text of Blue. I believe that's a scoping problem? But even if I put a Do in front of it it doesn't work.

Read the entire post on Facebook