sswf::ActionSetTarget Class Reference

This class is used to define the sprite on which the actions apply. More...

#include <libsswf.h>

Inheritance diagram for sswf::ActionSetTarget:

sswf::Action sswf::MemoryManager sswf::ItemBase sswf::MemBuffer List of all members.

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 ActionDuplicate (void) const
 Create a duplicate of this action.
virtual ErrorManager::error_code_t SaveData (Data &data, Data &nested_data)
 Save the extra data of the ActionSetTarget.

Private Attributes

char * f_target

Detailed Description

Before becoming fully object oriented, ActionScript used this action to define the name of the Sprite on which the actions had an effect.

Using an empty name would reset the ActionScript to its default behavior.

See also:
SWF Alexis' Reference—Set Target

SWF Alexis' Reference—Set Target (dynamic)


Constructor & Destructor Documentation

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.

Parameters:
[in] tag The tag in which this action is saved.


Member Function Documentation

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.

Returns:
The pointer to the new ActionSetTarget

Reimplemented from sswf::Action.

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 function.

Parameters:
[in] data The Data buffer where the target name is saved
[in] nested_data The ActionSetTarget has no nested data

Reimplemented from sswf::Action.

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.)


Member Data Documentation

char* sswf::ActionSetTarget::f_target [private]


The documentation for this class was generated from the following files:
Generated on Sun May 13 23:29:39 2007 for libsswf by  doxygen 1.4.7