Animating Elements into View on a Screen
Working with animations
You can use the area outside the screen in the designer to simulate panning or paging. This is particularly useful when you don't want to enable scrollbars or when you want to move only some elements into or outside the screen.
The following image shows a sample screen before and after an interaction that animates elements into view. In this walkthrough you'll only use some of the elements in it.
- Adding elements inside the screen.
- Adding elements outside the screen.
- Adding an interaction to trigger the simulation.
- Making changes to the screen as a result of the interaction.
- Animating the transition.
- Running the screen preview.
In a new screen, add a rectangle and set its background color to red.
Add a custom shape and shape so that it looks like a car. Set its border color to dark red.
Add a couple of circles for wheels. Set the border color to the same dark red as the car.
Add an icon, pick the sad smiley, and set its border color to the same you used for the car.
Group the shapes and the icon using Ctrl/Cmd + G. Your sad car is ready!
Copy and paste the sad car. Place the new car outside the screen, and align it horizontally to the original car.
You can name your groups. Name the original car sad car, and the new one happy car.
Change the color of the happy car. Edit the group by double clicking it, and change the color of the elements inside it.
Change the icon, choose the happy smiley.
Add an arrow icon, set its color to white and its transparency to 60%.
Add a tap interaction to a new state.
In the new state, move both cars so that the green one is centered with the rectangle inside the screen and the red one is outside the screen.
Change the background color of the rectangle to green.
Remove the arrow icon.
Drag the move actions and the set background action to extend their duration to half a second.
Click on the
Run Screen option at the top of the designer.
The preview runs and you can click on the arrow to see the animation.