Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

FAction.h File Reference

#include <iostream>
#include <strstream>
#include <vector>
#include "FBase.h"

Go to the source code of this file.

Compounds

class  FlashActionConstantPool
class  FlashActionDefineFunction
class  FlashActionGetURL
class  FlashActionPush
class  FlashActionRecord
class  FlashActionVectorImporter
class  FlashActionWaitForFrame
class  FlashActionWith
class  FlashTagDoAction

Defines

#define DECLARE_SIMPLE_ACTION_CLASS(ActionName, ActionID)
#define DECLARE_SIMPLE_ACTION_CLASS2(ActionName, ActionID, pName)
#define DECLARE_SIMPLE_ACTION_CLASS3(ActionName, ActionID, pName)
#define DECLARE_SIMPLE_ACTION_CLASS4(ActionName, ActionID, pName)

Functions

 DECLARE_SIMPLE_ACTION_CLASS (FlashActionNextFrame, 0x04)
 DECLARE_SIMPLE_ACTION_CLASS2 (FlashActionGotoFrame, 0x81, frame)
 DECLARE_SIMPLE_ACTION_CLASS3 (FlashActionSetTarget, 0x8B, target)
 DECLARE_SIMPLE_ACTION_CLASS3 (FlashActionGotoLabel, 0x8C, label)
 DECLARE_SIMPLE_ACTION_CLASS4 (FlashActionWaitForFrame2, 0x8D, skipcount)
 DECLARE_SIMPLE_ACTION_CLASS2 (FlashActionJump, 0x99, offset)
 DECLARE_SIMPLE_ACTION_CLASS4 (FlashActionGetURL2, 0x9A, method)
 DECLARE_SIMPLE_ACTION_CLASS4 (FlashActionGotoFrame2, 0x9F, play)
 DECLARE_SIMPLE_ACTION_CLASS4 (FlashActionStoreRegister, 0x87, registernumber)


Define Documentation

#define DECLARE_SIMPLE_ACTION_CLASS ActionName, ActionID
 

Value:

class ActionName : public FlashActionRecord                                             \
{                                                                                                                               \
public:                                                                                                                 \
        ActionName() { m_code=ActionID; }                                                       \
        ~ActionName() {}                                                                                        \
        virtual void Write(std::ostream &out) { WriteHeader(out); }     \
private:                                                                                                                \
};

#define DECLARE_SIMPLE_ACTION_CLASS2 ActionName, ActionID, pName
 

Value:

class ActionName : public FlashActionRecord                                                     \
{                                                                                                                                       \
public:                                                                                                                         \
        ActionName(SWORD pName) : data(pName) { m_code=ActionID; }              \
        ~ActionName() {}                                                                                                \
        virtual void Write(std::ostream &out) { WriteHeader(out,2);             \
                                                                                        WRITE_SWORD(data); }    \
        SWORD Get##pName() { return data; }                                                             \
        virtual void Read(std::istream &in) { ReadHeader(in); READ_SWORD(data); } \
private:                                                                                                                        \
        ActionName() {}                                                                                                 \
        friend class FlashActionVectorImporter;                                         \
        SWORD data;                                                                                                             \
};

#define DECLARE_SIMPLE_ACTION_CLASS3 ActionName, ActionID, pName
 

Value:

class ActionName : public FlashActionRecord                                                                                     \
{                                                                                                                                                                       \
public:                                                                                                                                                         \
        ActionName(char *pName) : data(pName), remove(false) { m_code=ActionID; }                               \
        ~ActionName() { if(remove) free(data); }                                                                                                                                \
        virtual void Write(std::ostream &out) { WriteHeader(out,strlen(data)+1);                \
                                                                                        out << data; out.put((char)0); }                        \
        const char *Get##pName() { return data; }                                                               \
        virtual void Read(std::istream &in) { ReadHeader(in); remove = true; std::vector<char> str; unsigned int i;     while((i = in.get()) != 0)      { str.push_back((char)i); } data = (char*)malloc(str.size()+1); i=0; for(;i < str.size(); i++) { data[i]=str[i]; }      data[i]=0; } \
private:                                                                                                                                                        \
    ActionName() : remove(false) {}                                                                                                     \
        bool remove;                                                   \
        friend class FlashActionVectorImporter;                                         \
        char *data;                                                                                                                             \
};

#define DECLARE_SIMPLE_ACTION_CLASS4 ActionName, ActionID, pName
 

Value:

class ActionName : public FlashActionRecord                                                     \
{                                                                                                                                       \
public:                                                                                                                         \
        ActionName(char pName) : data(pName) { m_code=ActionID; }               \
        ~ActionName() {}                                                                                                \
        virtual void Write(std::ostream &out) { WriteHeader(out,1);             \
                                                                                        out.put(data); }                        \
        char Get##pName() { return data; }                                                              \
        virtual void Read(std::istream &in) { ReadHeader(in); data=in.get(); } \
private:                                                                                                                        \
        ActionName() {}                                                                                                 \
        friend class FlashActionVectorImporter;                                         \
        char data;                                                                                                              \
};


Function Documentation

DECLARE_SIMPLE_ACTION_CLASS FlashActionNextFrame ,
0x04
 

DECLARE_SIMPLE_ACTION_CLASS2 FlashActionJump ,
0x99 ,
offset
 

DECLARE_SIMPLE_ACTION_CLASS2 FlashActionGotoFrame ,
0x81 ,
frame
 

DECLARE_SIMPLE_ACTION_CLASS3 FlashActionGotoLabel ,
0x8C ,
label
 

DECLARE_SIMPLE_ACTION_CLASS3 FlashActionSetTarget ,
0x8B ,
target
 

DECLARE_SIMPLE_ACTION_CLASS4 FlashActionStoreRegister ,
0x87 ,
registernumber
 

DECLARE_SIMPLE_ACTION_CLASS4 FlashActionGotoFrame2 ,
0x9F ,
play
 

DECLARE_SIMPLE_ACTION_CLASS4 FlashActionGetURL2 ,
0x9A ,
method
 

DECLARE_SIMPLE_ACTION_CLASS4 FlashActionWaitForFrame2 ,
0x8D ,
skipcount
 


Generated at Wed Aug 1 13:33:51 2001 for SWFSource by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001