MoveTransition
Function: MoveTransition( | delay, factory=None) |
This transition attempts to find images that have changed position, and moves them from the old position to the new transition, taking delay seconds to complete the move.
If factory is given, it is expected to be a function that takes as arguments: an old position, a new position, the delay, and a displayable, and to return a displayable as an argument. If None, the default behavior is to move the displayable from the starting to the ending positions.
Images are considered to be the same if they have the same tag, in the same way that the tag is used to determine which image to replace or to hide.
If you use this transition to slide an image off the side of the screen, remember to hide it when you are done.
Example
init: $ move = MoveTransition(0.5) e "The move transition moves around images that have changed position." e "For example..." show eileen happy at offscreenleft with move e "I can move over to the offscreenleft position, just off the left side of the screen." show eileen happy at left with move e "The left position has my left side border the left margin of the screen." show eileen happy at center with move e "I can also move to the center..." show eileen happy at right with move e "... the right ..." show eileen happy at offscreenright with move e "... or even to offscreenright, off the right-hand side of the screen." show eileen happy at right with move e "We don't limit you to these five positions either. You can always create your own Position objects."