Made to Order Software Corporation Logo

libsswf: sswf::TagFrameLabel Class Reference

Defines a label (name) for a frame. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagFrameLabel:

:TagBase :MemoryManager

List of all members.

Public Member Functions

virtual ErrorManager::error_code_t Save (Data &data)
 Save the frame label in the specified Data buffer.
void SetFrameLabel (const char *label)
 This function defines the name (label) of a frame.
 TagFrameLabel (TagBase *parent)
 Initializes the frame label object.
virtual swf_type_t TypeFlags (void) const
 This function returns the type of a TagFrameLabel object.

Private Member Functions

virtual ErrorManager::error_code_t ParseTag (swf_tag_t tag, const Data &data)
 Parse data from a file into a FrameLabel tag.
virtual ErrorManager::error_code_t PreSave (void)
 Ensure the minimum version is valid.

Private Attributes

char * f_label

Detailed Description

This tag is used to name a frame in a movie. The advantage is to be able to go to that frame by name later.

See also:
SWF Alexis' Reference—Frame Label

SWF Alexis' Reference—swf_tag

Constructor & Destructor Documentation

TagFrameLabel::TagFrameLabel ( TagBase parent  ) 

The constructor initializes the frame label to no name.

[in] parent The parent (TagHeader) of this frame

References f_label.

Member Function Documentation

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

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

[in] tag The tag that generated this call
[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 sswf::Data::ByteSize(), sswf::ErrorManager::ERROR_CODE_BAD_STRING, sswf::ErrorManager::ERROR_CODE_NONE, f_label, sswf::MemoryManager::MemAlloc(), sswf::MemoryManager::MemClean(), and sswf::Data::ReadBytes().

ErrorManager::error_code_t TagFrameLabel::PreSave ( void   )  [private, virtual]

This function checks that the movie is at least a version 3 Flash animation.

If the anchor extension is used (i.e. the label name starts with a '#') then the minimum version must be 6.

An ErrorManager::error_code_t, ErrorManager::ERROR_CODE_NONE when no errors occur

Reimplemented from sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_label, and sswf::TagBase::MinimumVersion().

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

This function saves the label in the specified Data buffer.

If the name has not been set or set to an empty string, then this function has no effect (nothing is saved.)

If an anchor is saved, the label string is followed by one byte set to 1.

[in,out] data The Data buffer where the frame label is saved
An ErrorManager::error_code_t, ErrorManager::ERROR_CODE_NONE when no errors occur

Implements sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_label, sswf::Data::PutByte(), sswf::TagBase::SaveString(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_FRAME_LABEL.

void TagFrameLabel::SetFrameLabel ( const char *  label  ) 

This function can be used to define the name of a frame.

The name can really be anything, but it is strongly suggested that you start the name with a letter and only use letters, digits and underscores for full compatibility.

When the name starts with a '#' character, it is taken as an anchor. This anchor can be specified on the URL when accessing the Flash animation.

Set the frame label to an empty name (or do not set it) to avoid saving it in the output movie.

[in] label The frame label/name

References f_label, sswf::MemoryManager::MemFree(), and sswf::MemoryManager::StrDup().

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

This function returns SWF_TYPE_CONTROL.


Implements sswf::TagBase.


Member Data Documentation

Reimplemented from sswf::TagBase.

Referenced by ParseTag(), PreSave(), Save(), SetFrameLabel(), and TagFrameLabel().

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

Generated on Wed Mar 18 15:13:59 2009 for libsswf by  doxygen 1.5.5