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

What is Framer? Join the Community
Return to index
Kyle Hinze
Posted May 15 - Read on Facebook

I'm trying to follow an example with pageComponent that has indicators switching at the bottom to show the currently selected screen in a carousel. But I can't figure out why I have an error here. The weird thing is that if I just declare something from the array like:

allIndicators[3].opacity = 1.0

It works. That makes me think there's something wrong with the way I define the variable "current" since it errors when I use it as an index number in the array.

Any help is super appreciated!

2 Comments

Koen Bok

I would look what current is. I expect it has a value that is not a valid index for your array.

Just add `print current` at between line 57 and 57.

Kevin Mao

On line 57, horizontalPageIndex requires a page of the page component in the parentheses, so try current = pageScroller.horizontalPageIndex(pageScroller.currentPage)

Read the entire post on Facebook