Presents video/audio to the user in a manner similar to Slides.
Like the Slide, movies can blit an image to the screen, perform click
and highlight behavior, nest within Panels, and even nest Sprites such as
Hotspots, Text, and Slides.
It is worth mentioning that Pygame has limited support for movies, and
these limitations transfer to Pyzzle. Movie files must use the MPEG-1
video codec. If the movie files contain audio, they must use the MPEG-2
audio codec (not MP2), and no other sounds can play alongside them. As of
0.9, I have not been able to get sound to play from movie files. However,
you can specify a seperate audio file to play alongside the movie using
the soundfile attribute. This has the added benefit of being able to play
alongside other sounds.
|
__init__(self,
id,
moviefile,
soundfile=None,
stage=None,
rectRel=None,
layer=0,
loop=False,
onStop=lambda: None)
Creates a Movie |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
draw(self,
screen)
Renders the movie to the screen, then draws any sprites within the
Movie. |
source code
|
|
|
enter(self,
oldslide=None,
delay=.1)
Called when the user encounters the Movie. |
source code
|
|
|
exit(self,
newslide=None,
delay=.1)
Called when the user exits the Movie. |
source code
|
|
Inherited from pygame.sprite.Sprite :
__repr__ ,
add_internal ,
alive ,
groups ,
kill ,
remove_internal ,
update
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
|
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|