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

What is Framer? Join the Community
Return to index
Henry Freel
Posted Feb 03 - Read on Facebook

just a quick question. is it possible to have a layer be an external link to a url, or possibly another framer project?


Koen Bok

Sure, put something like this in a click handler:

window.location = ""

Luc van Loon

For some reason I can't get this to work at all. I'm creating a VR prototype, where I'm creating a hotspot using layerA. I then want to make that layerA clickable to an external link.

layerA = new VRLayer
heading: 175
elevation: -30

layerA.on Events.Click, ->
window.location = ""


For some reason this doesn't do the trick. Any suggestions?

Jorn van Dijk

Not sure if this works with VR Layers, but this does:

layerA = new Layer
layerA.on Events.Click, ->
window.location = ""

Luc van Loon

VR layers might be the issue. It instantly clicks through with that code snippet Jorn. So with VR it instantly detects a click event. Even when I'm not swiping or clicking through the image to navigate.

Jordan Robert Dobson

Luc van Loon make sure you indent the window.location line.

Luc van Loon

Thanks Jordan for the suggestion but I believe I've done that correctly. Here's a snippet of my code:

and the framer project:

Tony Murphy

Is it possible to click projected VRLayers? tony = new VRLayer
heading: 230
elevation: 10


tony.on Events.Click, ->
heading: -30
elevation: 5

Jordan Robert Dobson

I did see in the VR documentation a way to trigger something... But it wasn't a click... So perhaps you could have a dummy layer that gets enabled / disabled based on a trigger happening. I believe Jonas Treub built a VR demo with triggers.

Jonas Treub

The orientation layer blocks all touch/click events. You can disable the orientation layer: vr.orientationLayer = false. Now all events will work like you expect. In a future update of the VRComponent the orientation layer will be replaced by a solution which does not stand in the way of interactivity.

Tony Murphy

Jordan Robert Dobson Jonas Treub Okay, thanks guys.

Read the entire post on Facebook