sswf::ActionGoto Class Reference

A goto action to change the current frame. More...

#include <libsswf.h>

Inheritance diagram for sswf::ActionGoto:

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

Public Member Functions

 ActionGoto (TagBase *tag, action_t action=ACTION_GOTO_FRAME)
 Initializes the ActionGoto action.
void SetFrameName (const char *frame_name)
 Set the name of the frame to go to.
void SetPlay (bool play)
 Set whether the animation continues to play after the goto.

Private Member Functions

virtual ActionDuplicate (void) const
 Create a duplicate of this action goto.
virtual ErrorManager::error_code_t SaveData (Data &data, Data &nested_data)
 Save the extraneous information of the ActionGoto.

Private Attributes

char * f_frame_name
bool f_play

Detailed Description

This action is used in ActionScripts to change the current frame to display.

See also:
SWF Alexis' Reference—Goto Expression

SWF Alexis' Reference—Goto Frame

SWF Alexis' Reference—Goto Label


Constructor & Destructor Documentation

ActionGoto::ActionGoto ( TagBase tag,
action_t  action = ACTION_GOTO_FRAME 
)

This function initializes the ActionGoto. This means the frame name is set to NULL and the playback flag is set to false (i.e. go to that frame and stop playing.)

The valid actions are:


Member Function Documentation

Action * ActionGoto::Duplicate ( void   )  const [private, virtual]

Create a new ActionGoto object copy the frame name and whether to continue or stop playback.

Returns:
The new ActionGoto object

Reimplemented from sswf::Action.

ErrorManager::error_code_t ActionGoto::SaveData ( Data data,
Data nested_data 
) [private, virtual]

Save the label information of the ActionGoto object.

Parameters:
[in] data The Data buffer where the ActionGoto is to be saved
[in] nested_data There is no nested data in an ActionGoto

Reimplemented from sswf::Action.

void ActionGoto::SetFrameName ( const char *  frame_name  ) 

It is possible to give a name to a frame. This action can then be used to go to that frame. You need to use an ACTION_GOTO_FRAME or ACTION_GOTO_LABEL for this purpose. The ACTION_GOTO_EXPRESSION uses the last string on the stack instead.

In case of an ACTION_GOTO_FRAME, the name can actually be a frame number in ASCII (i.e. "15"), otherwise it is the SSWF label name of a frame.

In case of an ACTION_GOTO_LABEL, whether the label exists in the movie is not being tested by the library.

Parameters:
[in] frame_name The name of the frame you want to go to

void sswf::ActionGoto::SetPlay ( bool  play  )  [inline]

This function is used to define whether the animation should continue to play after it jumped to the specified frame.

By default, the action says that the animation should stop playing.

Parameters:
[in] play The flag to tell whether it should play (true) or not (false)


Member Data Documentation

char* sswf::ActionGoto::f_frame_name [private]

bool sswf::ActionGoto::f_play [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