Public Member Functions

gnash::SWFMovie Class Reference

Stateful Movie object (a special kind of sprite). More...

#include <SWFMovie.h>

Inheritance diagram for gnash::SWFMovie:
Inheritance graph
[legend]
Collaboration diagram for gnash::SWFMovie:
Collaboration graph
[legend]

List of all members.

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::DefinitionTagexportedCharacter (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_definitiondefinition () const

Detailed Description

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.


Constructor & Destructor Documentation

gnash::SWFMovie::SWFMovie ( as_object object,
const SWFMovieDefinition def,
DisplayObject parent 
)

Referenced by construct().

virtual gnash::SWFMovie::~SWFMovie (  )  [inline, virtual]

Member Function Documentation

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.

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(), and SWFMovie().

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.

Parameters:
symbol The exported symbol of the character to retrieve.
Returns:
The DefinitionTag of the requested character or 0 if the character has not yet been exported.

Reimplemented from gnash::Movie.

References gnash::MovieClip::get_frame_count(), and IF_VERBOSE_MALFORMED_SWF.

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.

Parameters:
id The id of the character to initialize.
Returns:
false if the character cannot be initialized. This can mean 1. The character is not yet present (either not exported or has not yet been placed on stage). 2. The character has already been initialized. true if the character was marked initialized.

Reimplemented from gnash::Movie.

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]

Get the version of the SWFMovie.

Returns:
the version of the SWFMovie.

Implements gnash::Movie.

virtual size_t gnash::SWFMovie::widthPixels (  )  const [inline, virtual]

Implements gnash::Movie.


The documentation for this class was generated from the following files: