Public Member Functions

gnash::Movie Class Reference

A top-level, standalone Movie that can be loaded and played. More...

#include <Movie.h>

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

List of all members.

Public Member Functions

 Movie (as_object *object, const movie_definition *def, DisplayObject *parent)
virtual ~Movie ()
virtual void advance ()=0
 Advance to the next frame of the MovieClip.
virtual float frameRate () const =0
virtual size_t widthPixels () const =0
virtual size_t heightPixels () const =0
virtual bool ensureFrameLoaded (size_t) const
virtual const std::string & url () const =0
 Get the URL the Movie was loaded from.
virtual int version () const =0
 Get the version of the Movie.
virtual SWF::DefinitionTagexportedCharacter (const std::string &)
 Get an exported character definition by its symbol name.
virtual void addCharacter (boost::uint16_t)
 Add a character to the list of known characters.
virtual bool initializeCharacter (boost::uint16_t)
 Attempt to mark a character as initialized.
virtual const movie_definitiondefinition () const =0

Detailed Description

A top-level, standalone Movie that can be loaded and played.

This is an abstract interface for any Movie that can be loaded directly into Gnash, including SWFs and Bitmaps. The interface is not especially clean because SWFs and Bitmaps are treated the same as top-level movies despite having almost nothing in common. As this is required by Flash, it seems unavoidable.


Constructor & Destructor Documentation

gnash::Movie::Movie ( as_object object,
const movie_definition def,
DisplayObject parent 
) [inline]
virtual gnash::Movie::~Movie (  )  [inline, virtual]

Member Function Documentation

virtual void gnash::Movie::addCharacter ( boost::uint16_t   )  [inline, 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.

Reimplemented in gnash::SWFMovie.

Referenced by gnash::SWF::ImportAssetsTag::executeState(), gnash::SWF::ExportAssetsTag::executeState(), and gnash::SWF::DefinitionTag::executeState().

virtual void gnash::Movie::advance (  )  [pure virtual]

Advance to the next frame of the MovieClip.

Actions will be executed or pushed to the queue as necessary.

Reimplemented from gnash::MovieClip.

Implemented in gnash::BitmapMovie, and gnash::SWFMovie.

virtual const movie_definition* gnash::Movie::definition (  )  const [pure virtual]
virtual bool gnash::Movie::ensureFrameLoaded ( size_t   )  const [inline, virtual]

Reimplemented in gnash::SWFMovie.

Referenced by gnash::Gui::advanceMovie().

virtual SWF::DefinitionTag* gnash::Movie::exportedCharacter ( const std::string &   )  [inline, 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 in gnash::SWFMovie.

virtual float gnash::Movie::frameRate (  )  const [pure virtual]

Implemented in gnash::BitmapMovie, and gnash::SWFMovie.

virtual size_t gnash::Movie::heightPixels (  )  const [pure virtual]
virtual bool gnash::Movie::initializeCharacter ( boost::uint16_t   )  [inline, virtual]

Attempt to mark a character as initialized.

The default is to return false. Only a SWFMovie can have a list of characters.

Reimplemented in gnash::SWFMovie.

virtual const std::string& gnash::Movie::url (  )  const [pure virtual]

Get the URL the Movie was loaded from.

Implemented in gnash::BitmapMovie, and gnash::SWFMovie.

Referenced by main().

virtual int gnash::Movie::version (  )  const [pure virtual]

Get the version of the Movie.

Returns:
Either the version of the Movie or -1 if the Movie is of a type that has no version.

Implemented in gnash::BitmapMovie, and gnash::SWFMovie.

virtual size_t gnash::Movie::widthPixels (  )  const [pure virtual]

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