#include <libsswf.h>
Public Member Functions | |
ActionSetTarget (TagBase *tag) | |
Initializes the ActionSetTarget. | |
void | SetTarget (const char *target) |
Set the name of the Sprite to affect. | |
Private Member Functions | |
virtual Action * | Duplicate (void) const |
Create a duplicate of this action. | |
virtual ErrorManager::error_code_t | ParseData (const Data &data) |
Parse the data of the ActionSetTarget. | |
virtual ErrorManager::error_code_t | SaveData (Data &data, Data &nested_data) |
Save the extra data of the ActionSetTarget. | |
Private Attributes | |
char * | f_target |
Using an empty name would reset the ActionScript to its default behavior.
ActionSetTarget::ActionSetTarget | ( | TagBase * | tag | ) |
By default, the constructor creates an action target with no name (i.e. reset to normal default behavior).
Use the sswf::ActionSetTarget::SetTarget() function to define which sprite should be affected.
[in] | tag | The tag in which this action is saved. |
References f_target.
Referenced by Duplicate().
Action * ActionSetTarget::Duplicate | ( | void | ) | const [private, virtual] |
This function creates a new ActionSetTarget and copy the target name of 'this' SetTarget and return the result.
Reimplemented from sswf::Action.
References ActionSetTarget(), f_target, SetTarget(), and sswf::Action::Tag().
ErrorManager::error_code_t ActionSetTarget::ParseData | ( | const Data & | data | ) | [private, virtual] |
This function retrieves the name of the target as expected by this action.
[in] | data | The Data buffer where the target name is read from |
Reimplemented from sswf::Action.
References f_target, and sswf::Data::GetString().
ErrorManager::error_code_t ActionSetTarget::SaveData | ( | Data & | data, | |
Data & | nested_data | |||
) | [private, virtual] |
This function saves the name of the target as expected by this action.
[in] | data | The Data buffer where the target name is saved |
[in] | nested_data | The ActionSetTarget has no nested data |
Reimplemented from sswf::Action.
References f_target, and sswf::Action::SaveString().
void ActionSetTarget::SetTarget | ( | const char * | target | ) |
This function should be called with the name of the Sprite which needs to be affected by the following actions.
Set the name to NULL or an empty string to cancel a previous ActionSetTarget (this is the default so you do not have to do so.)
References f_target, sswf::MemoryManager::MemFree(), and sswf::MemoryManager::StrDup().
Referenced by Duplicate().
char* sswf::ActionSetTarget::f_target [private] |
Referenced by ActionSetTarget(), Duplicate(), ParseData(), SaveData(), and SetTarget().