Hi all, I am trying to send a layer to the front using pulse.placeBehind(LayerB), and I am getting an error message saying that 'pulse' is not an object.
It is an animation I am trying to place behind a layer, anyone knows how to send an animation back?
pulse = new Layer width: 24 height: 24 borderRadius: 100 opacity: 40
pulseUp = new Animation layer: pulse properties: scale: 3 opacity: 0 time: 1 repeat: 4
Are you trying to get the pulseUp animation to play behind the pulse layer?
What your code is doing iscreating a new layer named pulse, then applying an animation to that layer.
Daise Rocha I could be wrong, but it sounds like you've taken the code out of the documentation and pasted it into your project. You need to change the names "LayerA" and "LayerB" from the docs to the names of the layers you want to move. In this case it sounds like "LayerA" should probably be "pulse". You can place that layer behind some other layer before or during this animation depending on the result you're trying to achieve. If you want to attach your project it might be easier to help.
Sorry, it was just me explaining it... I am not using LayerA and B on my file... I am using: pulse.placeBehind(icon), and the error says that 'pulse' is not an object...
Hmm, ok—that would be happening if your code is not able to locate the pulse layer. This can often be a scoping problem since you clearly have a layer called "pulse" above. It's difficult to troubleshoot this kind of error without looking at your actual project. I'm happy to take a look if you want to attach it.
I'm not sure I'm clear on the result you're trying to achieve, so maybe I can make an example that helps. Here's a project that uses a layer called "pulse" and brings it in front of a layer called "icon" with placeBefore.
thanks Andrew Nalband, it does work when I design the object using the code tab, but it does not work when the object is designed on the design tab. Nothing is moving behind the object design on the design tab. I have just redesigned it using the code and is working fine. :/
Daise Rocha ok, I *think* I understand what you're trying to do. Changes you make in the code tab aren't reflected in the design tab. If you want to change something in the design tab, you can right click on a layer and select "Forward" from the dropdown. That will rearrange the layers. Is this what you want to accomplish?
It's a bit challenging to understand your goal from words alone. If you want to upload a link to your project, I may be better able to assist you.
https://framer.cloud/aDZOVHave a look, the dot is yellow was it behind the pulse animation...
Ok, thanks for sharing! We're getting there! :) I'm looking at this now.
Check out this example and tell me if that gets you to the result you're looking for https://framer.cloud/ZEFYp
You should now find the line "pulse.placeBehind(green)" is working as expected. Is this what you want?