Made to Order Software Corporation Logo

libsswf: sswf::TagSetBackgroundColor Class Reference

Set the background color of the movie. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagSetBackgroundColor:

:TagBase :MemoryManager

List of all members.

Public Member Functions

ColorGetColor (void)
 Retrive the current background color.
virtual ErrorManager::error_code_t Save (Data &data)
 Save the background color.
void SetColor (Color &color)
 Defines the color of the background.
 TagSetBackgroundColor (TagBase *parent)
 Initializes the background color object.
virtual swf_type_t TypeFlags (void) const
 Defines the different types of the background color tag.

Private Member Functions

virtual ErrorManager::error_code_t ParseTag (swf_tag_t tag, const Data &data)
 Parse data from a file into a ShowFrame tag.

Private Attributes

Color f_color

Detailed Description

This tag is used to defined the default background color of the movie. When unspecified, the background of a Flash animation is white.

Note however that the default color of a TagSetBackgroundColor is black.

The background color uses a solid color (no transparency). This prevents the Browsers from showing anything behind the Flash animation.

See also:
SWF Alexis' Reference—Set Background Color

SWF Alexis' Reference—swf_tag

Constructor & Destructor Documentation

TagSetBackgroundColor::TagSetBackgroundColor ( TagBase parent  ) 

Initializes the background object.

[in] parent The header in which this tag is added

Member Function Documentation

Color & TagSetBackgroundColor::GetColor ( void   ) 

This function returns a copy of the current background color.

The current background color

References f_color.

ErrorManager::error_code_t TagSetBackgroundColor::ParseTag ( swf_tag_t  tag,
const Data data 
) [private, virtual]

This function does nothing since the ShowFrame tag has no data.

[in] tag The tag being loaded
[in] data The Data buffer from the Flash file being loaded
An error if one occurs, or ErrorManager::ERROR_CODE_NONE

Implements sswf::TagBase.

References f_color, and sswf::Color::Parse().

ErrorManager::error_code_t TagSetBackgroundColor::Save ( Data data  )  [virtual]

This function saves the background color in the specified Data buffer.

The red, green and blue components are saved. The alpha channel is ignored.

An ErrorManager::error_code_t error, ErrorManager::ERROR_CODE_NONE when no error occured

Implements sswf::TagBase.

References sswf::Color::Blue(), sswf::ErrorManager::ERROR_CODE_NONE, f_color, sswf::Color::Green(), sswf::Data::PutByte(), sswf::Color::Red(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_SET_BACKGROUND_COLOR.

void TagSetBackgroundColor::SetColor ( Color color  ) 

This function copies the user color as the new background color.

[in] color The new background color

References f_color.

TagBase::swf_type_t TagSetBackgroundColor::TypeFlags ( void   )  const [virtual]

This function defines the SetBackgroundColor tag as:

  • SWF_TYPE_DEFINE—a definition
  • SWF_TYPE_UNIQUE—must be defined only once in the entire movie
  • SWF_TYPE_START—must be close to the start of the movie
a set of TagBase::swf_type_t flags

Implements sswf::TagBase.


Member Data Documentation

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

Generated on Wed Mar 18 15:14:00 2009 for libsswf by  doxygen 1.5.5