-
Switching back and forth between 2 layers
I am animating a mouse cursor that has two different states, one being the arrow and the other being a hand.
I am currently doing this by manually keyframing the opacity so that only one is showing at a time.
I have never really dealt with expressions in any real sense other than using pre-written ones from users on here and other sites but I have a general understanding of how things should probably work.
I have looked through various sites so far for some references on how this may be done but cannot seem to find anything that would help in writing a script that does something like this.
I had an idea that setting up a slider controller to a null object, and having that control the opacity of the layers in the following way…
Layer 1 (Arrow) would be 100 minus the Slider Controller Value
Layer 2 (Hand) would be the Slider Controller ValueIn my head the method should be this simple, but I can’t seem to find the resources online for where to start writing this properly. I can find much more advanced things and have been having a play with some of those, but I can’t find anything that would help with this.
The problem I am having is inverting the slider value, or adding the maths too the expression. I managed to link up both layers to the slider but they would only return the same result.
Could anyone please help me out with this, and if possible hook me up with some good websites, books or videos about expressions and scripting for beginners. I used to work with JavaScript about 10 years back and I do remember some of the basic ideas behind it, but there are massive gaps in my memory, and with it tied into after effects I think it’s best I try and learn from the ground up.
Cheers,
Dean