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

What is Framer? Join the Community
Return to index
Peter Kubin
Posted Oct 07 - Read on Facebook

this is a tricky one... i guess:

i am declaring an image of a layer with a path stored in an array.
image : someArray[0]

the image path itself within the array contains a variable which works fine at the initial call:
someArray = [""+myVariable+".html"]

if i set the variable to another value
image : someArray[0]
still displays the image according to the path with the previous, initial variable state. it does not reflect the update of the variable.

if i use the path with the variable as stored inside the array directly:
image : ""+myVariable+".html"
the correct image is being displayed.

since i do not update the content of the array but only a variable within its content, someArray[0] obviously does not get updated.

my question is: is there a simple way to force someArray[0] to refresh it's content or is this variable within array nonsense complete bollocks anyway?


Jordan Robert Dobson

So you want something to observe that variable for changes and then apply them?

When you pass the image to the property and concatenate the string when creating the url... The value of the array is converted to a string once applied to the image property.

So you need to update the image property with the new value in your array.

After you assign the image property it knows nothing of your array any longer.

Read the entire post on Facebook