Gnash
0.8.10
|
Stateful Movie object (a special kind of sprite) More...
#include <SWFMovie.h>
Public Member Functions | |
SWFMovie (as_object *object, const SWFMovieDefinition *def, DisplayObject *parent) | |
virtual | ~SWFMovie () |
virtual void | advance () |
Advance to the next frame of the MovieClip. | |
virtual float | frameRate () const |
virtual size_t | widthPixels () const |
virtual size_t | heightPixels () const |
virtual bool | ensureFrameLoaded (size_t frameNo) const |
void | construct (as_object *init=0) |
Handle a top-level movie on stage placement. | |
const std::string & | url () const |
Get the URL of the SWFMovie's definition. | |
int | version () const |
Get the version of the SWFMovie. | |
virtual SWF::DefinitionTag * | exportedCharacter (const std::string &symbol) |
Get an exported character definition by its symbol name. | |
void | addCharacter (boost::uint16_t id) |
Add a character to the list of known characters. | |
bool | initializeCharacter (boost::uint16_t id) |
Attempt to mark a character as initialized. | |
const movie_definition * | definition () const |
Stateful Movie object (a special kind of sprite)
The tasks of the Movie include: 1. Keep a 'dictionary' of parsed characters. This is a container of characters defined in previous frames. It acts like a genuine runtime dictionary of characters, although Gnash actually stores the definitions in the SWFMovieDefinition as it is parsed.
gnash::SWFMovie::SWFMovie | ( | as_object * | object, |
const SWFMovieDefinition * | def, | ||
DisplayObject * | parent | ||
) |
References assert.
virtual gnash::SWFMovie::~SWFMovie | ( | ) | [inline, virtual] |
void gnash::SWFMovie::addCharacter | ( | boost::uint16_t | id | ) | [virtual] |
Add a character to the list of known characters.
This makes the character known to ActionScript for initialization. Exported characters must both be in the definition's list of exports and added with this function before they are available. If a duplicated character is added, it will not be marked uninitialized, as SWF::DoInitAction tags are only executed once for each id.
Reimplemented from gnash::Movie.
void gnash::SWFMovie::advance | ( | ) | [virtual] |
Advance to the next frame of the MovieClip.
Actions will be executed or pushed to the queue as necessary.
Implements gnash::Movie.
References gnash::MovieClip::get_current_frame(), gnash::MovieClip::get_frame_count(), IF_VERBOSE_MALFORMED_SWF, and _.
void gnash::SWFMovie::construct | ( | as_object * | init = 0 | ) | [virtual] |
Handle a top-level movie on stage placement.
This method will just ensure first frame is loaded and then call MovieClip::construct
It's intended to be called by movie_root::setLevel().
Reimplemented from gnash::MovieClip.
References gnash::DisplayObject::saveOriginalTarget(), IF_VERBOSE_MALFORMED_SWF, _, and gnash::MovieClip::get_frame_count().
const movie_definition* gnash::SWFMovie::definition | ( | ) | const [inline, virtual] |
Implements gnash::Movie.
virtual bool gnash::SWFMovie::ensureFrameLoaded | ( | size_t | frameNo | ) | const [inline, virtual] |
Reimplemented from gnash::Movie.
SWF::DefinitionTag * gnash::SWFMovie::exportedCharacter | ( | const std::string & | symbol | ) | [virtual] |
Get an exported character definition by its symbol name.
The character is only available after the ExportAssets tag has been executed.
symbol | The exported symbol of the character to retrieve. |
Reimplemented from gnash::Movie.
virtual float gnash::SWFMovie::frameRate | ( | ) | const [inline, virtual] |
Implements gnash::Movie.
virtual size_t gnash::SWFMovie::heightPixels | ( | ) | const [inline, virtual] |
Implements gnash::Movie.
bool gnash::SWFMovie::initializeCharacter | ( | boost::uint16_t | id | ) | [virtual] |
Attempt to mark a character as initialized.
A character can be initialized once, but only after it is known to this Movie.
id | The id of the character to initialize. |
Reimplemented from gnash::Movie.
References IF_VERBOSE_MALFORMED_SWF, and _.
const std::string& gnash::SWFMovie::url | ( | ) | const [inline, virtual] |
Get the URL of the SWFMovie's definition.
Implements gnash::Movie.
int gnash::SWFMovie::version | ( | ) | const [inline, virtual] |
virtual size_t gnash::SWFMovie::widthPixels | ( | ) | const [inline, virtual] |
Implements gnash::Movie.