We’ve created a power button before, and now it’s time to animate it! Let me show you a simple way of doing so.
In this tutorial, I’m not going to go through the process of creating the actual design of this button. I’ve used bits and pieces from my Siri Icon tutorial, and my Carbon Power Button tutorial. You can also download the PSD for this tutorial by clicking the image above.
The PSD contains two versions of the power symbol. One layer that’s turned off, and one layer that contains all the glows.
Transitioning between the two symbols is simple, but we need to take care of something quite crucial before we begin. Photoshop doesn’t animate Layer Styles that well! If we were to create an animation using the ‘glowing’ symbol with the Layer Styles attached, Photoshop won’t activate the Layer Styles of that layer until the last frame in the animation. We can solve this issue quite simply.
Filter > Convert for Smart Filters
This will essentially flatten your layer, temporarily, allowing Photoshop to seamlessly animate between the two layers. At any point you want to change the Layer Styles, simply double click on the Layer’s thumbnail.
We’re ready to animate! In order to animate within Photoshop, we need to reveal our Animation Panel. Head to Window > Animation to bring up the Timeline. It will appear at the bottom of your workspace. However, we don’t want to animate using the Timeline, but instead want to animate by frame. Click on the Convert to frame animation button on the far right side of your Timeline.
You should now see the Frames view, as seen below.
At this point, there are a few small things that need to be done before we animate. First, you might notice the “10 sec.” text below the first frame. This tells us how long each frame will be held for. As we’re looking for a smooth animation, we can safely change this to “No Delay” by clicking on the small black arrow beside the time.
The next thing that needs to be done, is we need to create our ‘initial view‘. Do you want the animation to start with the power button on or off? Assuming you want the power button in the off position when the animation starts, set the Opacity of the Glowing Symbol layer to 0%.
You should only see the dark power button at the moment. We now need to set the ‘glowing view‘. On your Animation Panel, click on the Duplicate selected frames button to create a new frame from the current state.
Now just like we set the Opacity of the glowing layer to 0% for our ‘initial view’, we now want to set the Opacity to 100% in order to fully reveal the glowing layer.
Your Glowing Symbol layer should be fully visible at this point.
Now that we have both frames set up, we need to create the transitioning frames. Lucky for us, Photoshop has a really simple way of doing this. Tweening. At the bottom of your Animation Panel, there is the Tweens animation frames button.
Pressing this button will pop up a new window with a few options.
If your second frame is selected, you’ll want to set Tween With to Previous Frame. Frames to Add will define how fast or slow your animation will be. 7 should give you a nice “on” effect. Press OK to create the 7 new frames.
A nice transition has been created between the two frames that we created. Pressing the Play button will preview your animation. Note! The first playback may seem choppy, as Photoshop is ‘rendering’ the animation.
From here, there are a few options. If you want the animation to simply ‘turn on‘, then you can leave the animation as is. However, we’re going to go a bit further, and create a ‘throb’ animation. To create the ‘off‘ animation, we essentially want to the exact same thing, except for one small change. Instead of transitioning right into the ‘off’ animation, we’re going to add a slight pause.
On your last frame in the Animation Panel, change the delay to a higher number than 0, such as 1 seconds. This will put a slight pause after the button turns on.
Now we need to create the backwards animation. Just like we did earlier, press the Duplicate selected frames button to create a few frame, and make sure to change the delay on the new frame to No Delay.
When that new frame is created, turn the Opacity of the Glowing layer back down to 0%.
Once the Opacity is set for this new frame, it’s time to Tween it! Just like before, click on the Tween button at the bottom of your Animation Panel, and choose your desired frames. I chose to add more frames than before, to give a stronger ‘throb’ effect.
At this point, you may notice that your new frames have been all set to 1 second.
To fix this, hold down your Shift key then click on the second frame with the adjusted time. This will select all the frames in-between.
When the frames are selected, click on any of the black arrows, then change the Delay to No Delay. Your animation is now complete! To save the animation, use the File > Save for Web & Devices feature.
When in the Save for Web & Devices dialogue, you want to make sure to save your image as a GIF, and look over the Looping options at the bottom. It will allow you to loop the animation Forever or just Once. Here is our final animation: