An example scenario is that I have a bus sitting on the left side of the screen and a say message displayed. When the user clicks on the screen and dismisses the say message, I want the animation of the bus moving across the screen to the right and disappearing off the screen. Obviously I only want the animation to run once. To do this I create a Screen with a Timer set to the length of the Animation. I pass in a list of Displayables that usually would contain the Background first, followed by any overlaid images followed by the Animation which will run on Top.
My Movie Animations are Masked so that just the moving figure is in the Movie. In the case below, it contains only the moving Bus.
Code: Select all
screen playMovie(movieLen, *displayables):
for displayablesName in displayables:
add displayablesName
timer movieLen action Hide("playMovie") repeat False
key "dismiss" action [[]]
show screen playMovie(3, "myBackground", "myAnimation")
Is there some technique I can use to resolve this or some way to pre-load the Movie so that there isn't a noticible delay?
(My game will be using this repeatedly)