#include <libsswf.h>
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 |
TagFrameLabel::TagFrameLabel | ( | TagBase * | parent | ) |
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 |
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.
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 |
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.
References SWF_TYPE_CONTROL.
char* sswf::TagFrameLabel::f_label [private] |
Reimplemented from sswf::TagBase.
Referenced by ParseTag(), PreSave(), Save(), SetFrameLabel(), and TagFrameLabel().