home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / flash078.zip / flashsource-r0_7_8.zip / FAction.cpp < prev    next >
C/C++ Source or Header  |  2001-05-17  |  15KB  |  496 lines

  1. #include <stdarg.h>
  2. #include "FAction.h"
  3.  
  4. void FlashActionRecord::WriteHeader(std::ostream &out, UWORD size)
  5. {
  6.     if(m_code > 0x80)
  7.     {
  8.         out.put( (char)m_code);
  9.         WRITE_UWORD(size);
  10.     }
  11.     else
  12.     {
  13.         out.put( (char)m_code);            
  14.     }
  15.  
  16. }
  17.  
  18. void FlashActionPush::Write(std::ostream &out)
  19. {
  20.     WriteHeader(out,len+1);
  21.     out.put((char)type);
  22.     out.write(data,len);
  23. }
  24. void FlashActionPush::Read(std::istream &in)
  25. {
  26.     ReadHeader(in);
  27.     type = in.get();
  28.     len = m_size-1;
  29.     data = (char *)malloc(m_size);
  30.     gcstrings.push_back(data);
  31.     in.read(data,m_size-1);
  32. }
  33.  
  34.  
  35. FlashActionDefineFunction::FlashActionDefineFunction( char *function ...)
  36. {
  37.         
  38.     m_functionName=function;
  39.  
  40.     va_list ap;
  41.     va_start(ap, function);
  42.  
  43.     for(;;)
  44.     {
  45.         char *p=va_arg(ap,char*);
  46.         if(p == 0) break;
  47.         m_paramNames.push_back(p);
  48.     }
  49.     va_end(ap);
  50.  
  51.     m_numParams = m_paramNames.size();
  52.     
  53. }
  54.  
  55. FlashActionDefineFunction::~FlashActionDefineFunction()
  56. {
  57. }
  58.  
  59. void FlashActionDefineFunction::AddAction(FlashActionRecord *r)
  60. {
  61.     m_actions.push_back(r);
  62. }
  63.  
  64. void FlashActionDefineFunction::Write(std::ostream &out)
  65. {
  66.  
  67.     out.put((char)0x9B); // FActionDefineFunction tag
  68.     
  69.     int len=0;
  70.     for(std::vector<char*>::iterator i=m_paramNames.begin(); i != m_paramNames.end(); i++)
  71.     {
  72.         len+=strlen(*i)+1;
  73.     }
  74.  
  75.     WRITE_UWORD(strlen(m_functionName)+1+len+4);
  76.     
  77.     out << m_functionName;
  78.     out.put((char)0);
  79.     
  80.     WRITE_UWORD(m_numParams);
  81.     
  82.     for(std::vector<char*>::iterator is=m_paramNames.begin(); is != m_paramNames.end(); is++)
  83.     {
  84.         out << (*is);
  85.         out.put((char)0);
  86.     }
  87.     std::ostrstream tmp;
  88.     for(std::vector<FlashActionRecord *>::iterator ir = m_actions.begin(); ir != m_actions.end(); ir++)
  89.     {
  90.         (*ir)->Write(tmp);
  91.     }
  92.     WRITE_UWORD(tmp.pcount());
  93.     out.write(tmp.rdbuf()->str(),tmp.pcount());
  94. }
  95. void FlashActionDefineFunction::Read(std::istream &in)
  96. {
  97.     ReadHeader(in);
  98.     
  99.     {
  100.         std::vector<char> str;
  101.         unsigned int i;
  102.         while((i = in.get()) != 0)
  103.         {
  104.             str.push_back((char)i);
  105.         }
  106.         m_functionName = (char*)malloc(str.size()+1);
  107.         m_gcstrings.push_back(m_functionName);
  108.         i=0;
  109.     
  110.         for(;i < str.size(); i++)
  111.         {
  112.             (m_functionName)[i]=str[i];
  113.         }
  114.         (m_functionName)[i]=0;
  115.     }
  116.     
  117.     READ_UWORD(m_numParams);
  118.     
  119.     for(UDWORD it = 0; it < (UDWORD)m_numParams; it++)
  120.     {
  121.         std::vector<char> str;
  122.         unsigned int i;
  123.         while((i = in.get()) != 0)
  124.         {
  125.             str.push_back((char)i);
  126.         }
  127.         char *s = (char*)malloc(str.size()+1);
  128.         m_paramNames.push_back(s);
  129.         m_gcstrings.push_back(s);
  130.         i=0;
  131.     
  132.         for(;i < str.size(); i++)
  133.         {
  134.             (m_paramNames[it])[i]=str[i];
  135.         }
  136.         (m_paramNames[it])[i]=0;
  137.     }
  138.  
  139.     UWORD num_actions;
  140.     READ_UWORD(num_actions);
  141.     
  142.     FlashActionVectorImporter i;
  143.     i.Import(in,m_actions, records_delete, num_actions);
  144. }
  145.  
  146. FlashActionConstantPool::FlashActionConstantPool(char *c ...)
  147. {
  148.     va_list ap;
  149.     va_start(ap,c);
  150.  
  151.     m_length=0;
  152.  
  153.     char *p=c;
  154.     m_strings.push_back(p);
  155.     m_length+=strlen(p)+1;
  156.     
  157.     for(;;)
  158.     {
  159.         char *p=va_arg(ap,char*);
  160.         if(p == 0) break;
  161.         m_strings.push_back(p);
  162.         m_length+=strlen(p)+1;
  163.     }
  164.     va_end(ap);
  165.     
  166. }
  167. void FlashActionConstantPool::Write(std::ostream &out)
  168. {
  169.     out.put((char)0x88);
  170.     WRITE_UWORD(m_length+2);
  171.     WRITE_UWORD(m_strings.size());
  172.     
  173.     for(std::vector<char*>::iterator is=m_strings.begin(); is != m_strings.end(); is++)
  174.     {
  175.         out << (*is);
  176.         out.put((char)0);
  177.     }
  178.  
  179. }
  180.  
  181. void FlashActionConstantPool::Read(std::istream &in)
  182. {
  183.     ReadHeader(in);
  184.     
  185.     UWORD size;
  186.     m_length = m_size - 2;
  187.     READ_UWORD(size);
  188.     
  189.     for(UDWORD it = 0; it < (UDWORD)size; it++)
  190.     {
  191.         std::vector<char> str;
  192.         unsigned int i;
  193.         while((i = in.get()) != 0)
  194.         {
  195.             str.push_back((char)i);
  196.         }
  197.         char *s = (char*)malloc(str.size()+1);
  198.         m_strings.push_back(s);
  199.         m_gcstrings.push_back(s);
  200.         
  201.         i=0;
  202.     
  203.         for(;i < str.size(); i++)
  204.         {
  205.             (m_strings[it])[i]=str[i];
  206.         }
  207.         (m_strings[it])[i]=0;
  208.     }
  209. }
  210.  
  211. void FlashActionWith::AddAction(FlashActionRecord *r)
  212. {
  213.     m_actions.push_back(r);
  214. }
  215.  
  216. void FlashActionWith::Write(std::ostream &out)
  217. {
  218.     out.put((char)0x94);        
  219.     std::ostrstream tmp;
  220.     for(std::vector<FlashActionRecord *>::iterator ir = m_actions.begin(); ir != m_actions.end(); ir++)
  221.     {
  222.         (*ir)->Write(tmp);
  223.     }
  224.     WRITE_UWORD(tmp.pcount());
  225.     out.write(tmp.rdbuf()->str(),tmp.pcount());
  226. }
  227. void FlashActionWith::Read(std::istream &in)
  228. {    
  229.     ReadHeader(in);
  230.     FlashActionVectorImporter i;
  231.     i.Import(in,m_actions, records_delete);
  232. }
  233. void FlashTagDoAction::AddAction(FlashActionRecord *r)
  234. {
  235.     records.push_back(r);
  236. }
  237. FlashTagDoAction::~FlashTagDoAction() 
  238. {
  239. }
  240. std::ostream &operator<< (std::ostream &out, FlashTagDoAction &data)
  241. {
  242.     std::ostrstream tmp;
  243.     for(std::vector<FlashActionRecord*>::iterator i=data.records.begin(); i < data.records.end(); i++)
  244.     {
  245.         (*i)->Write(tmp);
  246.     }
  247.     
  248.     out << FlashTagHeader(12, tmp.pcount()+1);
  249.     out.write(tmp.rdbuf()->str(),tmp.pcount());        
  250.     out << (char)0;
  251.     return out;
  252. }
  253. std::istream &operator>> (std::istream &in,  FlashTagDoAction &data)
  254. {
  255.     FlashActionVectorImporter i;
  256.     i.Import(in,data.records, data.records_delete);
  257.     return in;
  258. }
  259. #define IMPORT_ACTION_IF(n,x)                    \
  260.         if(i == x)                                \
  261.         {                                        \
  262.             FlashActionRecord *p = new n();     \
  263.             v.push_back(p);                        \
  264.             d.push_back(p);                     \
  265.             (*v[count]).Read(in);                \
  266.         }
  267. #define IMPORT_ACTION_ELSE_IF(n,x)                \
  268.         else IMPORT_ACTION_IF(n,x)
  269.  
  270. void FlashActionVectorImporter::Import(std::istream &in, std::vector<FlashActionRecord *> &v, gc_vector<FlashActionRecord*> &d)
  271. {
  272.     int i;
  273.     int count = 0;
  274.  
  275.     for(i = in.get(); i != 0; i=in.get())
  276.     {
  277.         in.putback(i);
  278.         IMPORT_ACTION_IF(FlashActionNextFrame,0x04)
  279.         IMPORT_ACTION_ELSE_IF(FlashActionPreviousFrame,0x05)
  280.         IMPORT_ACTION_ELSE_IF(FlashActionPlay,0x06)
  281.         IMPORT_ACTION_ELSE_IF(FlashActionStop,0x07)
  282.         IMPORT_ACTION_ELSE_IF(FlashActionToggleQuality,0x08)
  283.         IMPORT_ACTION_ELSE_IF(FlashActionStopSounds,0x09)
  284.         IMPORT_ACTION_ELSE_IF(FlashActionGotoFrame,0x81)
  285.         IMPORT_ACTION_ELSE_IF(FlashActionSetTarget,0x8B)
  286.         IMPORT_ACTION_ELSE_IF(FlashActionGotoLabel,0x8C)
  287.  
  288.         IMPORT_ACTION_ELSE_IF(FlashActionGetURL, 0x83)
  289.         IMPORT_ACTION_ELSE_IF(FlashActionWaitForFrame, 0x8A)
  290.                 
  291.         IMPORT_ACTION_ELSE_IF(FlashActionAdd,0x0A)
  292.         IMPORT_ACTION_ELSE_IF(FlashActionSubtract,0x0B)
  293.         IMPORT_ACTION_ELSE_IF(FlashActionMultiply,0x0C)
  294.         IMPORT_ACTION_ELSE_IF(FlashActionDivide,0x0D)
  295.         IMPORT_ACTION_ELSE_IF(FlashActionEquals,0x0E)
  296.         IMPORT_ACTION_ELSE_IF(FlashActionLess,0x0F)
  297.         IMPORT_ACTION_ELSE_IF(FlashActionAnd,0x10)
  298.         IMPORT_ACTION_ELSE_IF(FlashActionOr,0x11)
  299.         IMPORT_ACTION_ELSE_IF(FlashActionNot,0x12)
  300.         IMPORT_ACTION_ELSE_IF(FlashActionStringEquals,0x13)
  301.         IMPORT_ACTION_ELSE_IF(FlashActionStringLength,0x14)
  302.         IMPORT_ACTION_ELSE_IF(FlashActionStringExtract,0x15)
  303.         IMPORT_ACTION_ELSE_IF(FlashActionPop,0x17)
  304.         IMPORT_ACTION_ELSE_IF(FlashActionToInteger,0x18)
  305.         IMPORT_ACTION_ELSE_IF(FlashActionGetVariable,0x1C)
  306.         IMPORT_ACTION_ELSE_IF(FlashActionSetVariable,0x1D)
  307.         IMPORT_ACTION_ELSE_IF(FlashActionSetTarget2,0x20)
  308.         IMPORT_ACTION_ELSE_IF(FlashActionGetProperty,0x22)
  309.         IMPORT_ACTION_ELSE_IF(FlashActionSetProperty,0x23)
  310.         IMPORT_ACTION_ELSE_IF(FlashActionCloneSprite,0x24)
  311.         IMPORT_ACTION_ELSE_IF(FlashActionRemoveSprite,0x25)
  312.         IMPORT_ACTION_ELSE_IF(FlashActionTrace,0x26)
  313.         IMPORT_ACTION_ELSE_IF(FlashActionStartDrag,0x27)
  314.         IMPORT_ACTION_ELSE_IF(FlashActionEndDrag,0x28)
  315.         IMPORT_ACTION_ELSE_IF(FlashActionStringAdd,0x21)
  316.         IMPORT_ACTION_ELSE_IF(FlashActionStringLess,0x29)
  317.         IMPORT_ACTION_ELSE_IF(FlashActionRandomNumber,0x30)
  318.         IMPORT_ACTION_ELSE_IF(FlashActionMBStringLength,0x31)
  319.         IMPORT_ACTION_ELSE_IF(FlashActionCharToAscii,0x32)
  320.         IMPORT_ACTION_ELSE_IF(FlashActionAsciiToChar,0x33)
  321.         IMPORT_ACTION_ELSE_IF(FlashActionGetTime,0x34)
  322.         IMPORT_ACTION_ELSE_IF(FlashActionMBCharToAscii,0x36)
  323.         IMPORT_ACTION_ELSE_IF(FlashActionMBStringExtract,0x35)
  324.         IMPORT_ACTION_ELSE_IF(FlashActionMBAsciToChar,0x37)
  325.         IMPORT_ACTION_ELSE_IF(FlashActionWaitForFrame2,0x8D)
  326.         IMPORT_ACTION_ELSE_IF(FlashActionJump,0x99)
  327.         IMPORT_ACTION_ELSE_IF(FlashActionGetURL2,0x9A)
  328.         IMPORT_ACTION_ELSE_IF(FlashActionIf,0x9D)
  329.         IMPORT_ACTION_ELSE_IF(FlashActionCall,0x9E)
  330.         IMPORT_ACTION_ELSE_IF(FlashActionGotoFrame2,0x9F)
  331.  
  332.         IMPORT_ACTION_ELSE_IF(FlashActionPush, 0x96) // handle alternate instances??
  333.         
  334.         IMPORT_ACTION_ELSE_IF(FlashActionDelete,0x3a)
  335.         IMPORT_ACTION_ELSE_IF(FlashActionDelete2,0x3b)
  336.         IMPORT_ACTION_ELSE_IF(FlashActionDefineLocal,0x3c)
  337.         IMPORT_ACTION_ELSE_IF(FlashActionCallFunction,0x3d)
  338.         IMPORT_ACTION_ELSE_IF(FlashActionReturn,0x3e)
  339.         IMPORT_ACTION_ELSE_IF(FlashActionModulo,0x3f)
  340.         IMPORT_ACTION_ELSE_IF(FlashActionNewObject,0x40)
  341.         IMPORT_ACTION_ELSE_IF(FlashActionDefineLocal2,0x41)
  342.         IMPORT_ACTION_ELSE_IF(FlashActionInitArray,0x42)
  343.         IMPORT_ACTION_ELSE_IF(FlashActionInitObject,0x4)
  344.         IMPORT_ACTION_ELSE_IF(FlashActionTypeOf,0x44)
  345.         IMPORT_ACTION_ELSE_IF(FlashActionTargetPath,0x45)
  346.         IMPORT_ACTION_ELSE_IF(FlashActionEnumerate,0x46)
  347.         IMPORT_ACTION_ELSE_IF(FlashActionAdd2,0x47)
  348.         IMPORT_ACTION_ELSE_IF(FlashActionLess2,0x48)
  349.         IMPORT_ACTION_ELSE_IF(FlashActionEquals2,0x49)
  350.         IMPORT_ACTION_ELSE_IF(FlashActionToNumber,0x4a)
  351.         IMPORT_ACTION_ELSE_IF(FlashActionToString,0x4b)
  352.         IMPORT_ACTION_ELSE_IF(FlashActionPushDuplicate,0x4c)
  353.         IMPORT_ACTION_ELSE_IF(FlashActionStackSwap,0x4d)
  354.         IMPORT_ACTION_ELSE_IF(FlashActionGetMember,0x4e)
  355.         IMPORT_ACTION_ELSE_IF(FlashActionSetMember,0x4f)
  356.         IMPORT_ACTION_ELSE_IF(FlashActionIncrement,0x50)
  357.         IMPORT_ACTION_ELSE_IF(FlashActionDecrement,0x51)
  358.         IMPORT_ACTION_ELSE_IF(FlashActionCallMethod,0x52)
  359.         IMPORT_ACTION_ELSE_IF(FlashActionNewMethod,0x53)
  360.         IMPORT_ACTION_ELSE_IF(FlashActionBitAnd,0x60)
  361.         IMPORT_ACTION_ELSE_IF(FlashActionBitOr,0x61)
  362.         IMPORT_ACTION_ELSE_IF(FlashActionBitXor,0x62)
  363.         IMPORT_ACTION_ELSE_IF(FlashActionBitLShift,0x63)
  364.         IMPORT_ACTION_ELSE_IF(FlashActionBitRShift,0x64)
  365.         IMPORT_ACTION_ELSE_IF(FlashActionBitURShift,0x65)
  366.         IMPORT_ACTION_ELSE_IF(FlashActionStoreRegister,0x87)
  367.  
  368.         IMPORT_ACTION_ELSE_IF(FlashActionDefineFunction, 0x9B)
  369.         IMPORT_ACTION_ELSE_IF(FlashActionConstantPool, 0x88)
  370.         IMPORT_ACTION_ELSE_IF(FlashActionWith, 0x94)
  371.         else
  372.         {
  373.             FlashActionRecord *p = new FlashActionRecord();
  374.             v.push_back(p);
  375.             d.push_back(p);
  376.             (*v[count]).Read(in);
  377.         }
  378.         count ++;
  379.     }
  380.     count = 0;
  381. }
  382.  
  383. void FlashActionVectorImporter::Import(std::istream &in, std::vector<FlashActionRecord *> &v, gc_vector<FlashActionRecord*> &d, UDWORD num_actions)
  384. {
  385.     int i;
  386.     int count = 0;
  387.  
  388.     for(UDWORD num = 0; num < num_actions; num++)
  389.     {
  390.         i = in.get();
  391.         in.putback(i);
  392.         IMPORT_ACTION_IF(FlashActionNextFrame,0x04)
  393.         IMPORT_ACTION_ELSE_IF(FlashActionPreviousFrame,0x05)
  394.         IMPORT_ACTION_ELSE_IF(FlashActionPlay,0x06)
  395.         IMPORT_ACTION_ELSE_IF(FlashActionStop,0x07)
  396.         IMPORT_ACTION_ELSE_IF(FlashActionToggleQuality,0x08)
  397.         IMPORT_ACTION_ELSE_IF(FlashActionStopSounds,0x09)
  398.         IMPORT_ACTION_ELSE_IF(FlashActionGotoFrame,0x81)
  399.         IMPORT_ACTION_ELSE_IF(FlashActionSetTarget,0x8B)
  400.         IMPORT_ACTION_ELSE_IF(FlashActionGotoLabel,0x8C)
  401.  
  402.         IMPORT_ACTION_ELSE_IF(FlashActionGetURL, 0x83)
  403.         IMPORT_ACTION_ELSE_IF(FlashActionWaitForFrame, 0x8A)
  404.                 
  405.         IMPORT_ACTION_ELSE_IF(FlashActionAdd,0x0A)
  406.         IMPORT_ACTION_ELSE_IF(FlashActionSubtract,0x0B)
  407.         IMPORT_ACTION_ELSE_IF(FlashActionMultiply,0x0C)
  408.         IMPORT_ACTION_ELSE_IF(FlashActionDivide,0x0D)
  409.         IMPORT_ACTION_ELSE_IF(FlashActionEquals,0x0E)
  410.         IMPORT_ACTION_ELSE_IF(FlashActionLess,0x0F)
  411.         IMPORT_ACTION_ELSE_IF(FlashActionAnd,0x10)
  412.         IMPORT_ACTION_ELSE_IF(FlashActionOr,0x11)
  413.         IMPORT_ACTION_ELSE_IF(FlashActionNot,0x12)
  414.         IMPORT_ACTION_ELSE_IF(FlashActionStringEquals,0x13)
  415.         IMPORT_ACTION_ELSE_IF(FlashActionStringLength,0x14)
  416.         IMPORT_ACTION_ELSE_IF(FlashActionStringExtract,0x15)
  417.         IMPORT_ACTION_ELSE_IF(FlashActionPop,0x17)
  418.         IMPORT_ACTION_ELSE_IF(FlashActionToInteger,0x18)
  419.         IMPORT_ACTION_ELSE_IF(FlashActionGetVariable,0x1C)
  420.         IMPORT_ACTION_ELSE_IF(FlashActionSetVariable,0x1D)
  421.         IMPORT_ACTION_ELSE_IF(FlashActionSetTarget2,0x20)
  422.         IMPORT_ACTION_ELSE_IF(FlashActionGetProperty,0x22)
  423.         IMPORT_ACTION_ELSE_IF(FlashActionSetProperty,0x23)
  424.         IMPORT_ACTION_ELSE_IF(FlashActionCloneSprite,0x24)
  425.         IMPORT_ACTION_ELSE_IF(FlashActionRemoveSprite,0x25)
  426.         IMPORT_ACTION_ELSE_IF(FlashActionTrace,0x26)
  427.         IMPORT_ACTION_ELSE_IF(FlashActionStartDrag,0x27)
  428.         IMPORT_ACTION_ELSE_IF(FlashActionEndDrag,0x28)
  429.         IMPORT_ACTION_ELSE_IF(FlashActionStringAdd,0x21)
  430.         IMPORT_ACTION_ELSE_IF(FlashActionStringLess,0x29)
  431.         IMPORT_ACTION_ELSE_IF(FlashActionRandomNumber,0x30)
  432.         IMPORT_ACTION_ELSE_IF(FlashActionMBStringLength,0x31)
  433.         IMPORT_ACTION_ELSE_IF(FlashActionCharToAscii,0x32)
  434.         IMPORT_ACTION_ELSE_IF(FlashActionAsciiToChar,0x33)
  435.         IMPORT_ACTION_ELSE_IF(FlashActionGetTime,0x34)
  436.         IMPORT_ACTION_ELSE_IF(FlashActionMBCharToAscii,0x36)
  437.         IMPORT_ACTION_ELSE_IF(FlashActionMBStringExtract,0x35)
  438.         IMPORT_ACTION_ELSE_IF(FlashActionMBAsciToChar,0x37)
  439.         IMPORT_ACTION_ELSE_IF(FlashActionWaitForFrame2,0x8D)
  440.         IMPORT_ACTION_ELSE_IF(FlashActionJump,0x99)
  441.         IMPORT_ACTION_ELSE_IF(FlashActionGetURL2,0x9A)
  442.         IMPORT_ACTION_ELSE_IF(FlashActionIf,0x9D)
  443.         IMPORT_ACTION_ELSE_IF(FlashActionCall,0x9E)
  444.         IMPORT_ACTION_ELSE_IF(FlashActionGotoFrame2,0x9F)
  445.  
  446.         IMPORT_ACTION_ELSE_IF(FlashActionPush, 0x96) // Not Exactly....handle alternate instances
  447.         
  448.         IMPORT_ACTION_ELSE_IF(FlashActionDelete,0x3a)
  449.         IMPORT_ACTION_ELSE_IF(FlashActionDelete2,0x3b)
  450.         IMPORT_ACTION_ELSE_IF(FlashActionDefineLocal,0x3c)
  451.         IMPORT_ACTION_ELSE_IF(FlashActionCallFunction,0x3d)
  452.         IMPORT_ACTION_ELSE_IF(FlashActionReturn,0x3e)
  453.         IMPORT_ACTION_ELSE_IF(FlashActionModulo,0x3f)
  454.         IMPORT_ACTION_ELSE_IF(FlashActionNewObject,0x40)
  455.         IMPORT_ACTION_ELSE_IF(FlashActionDefineLocal2,0x41)
  456.         IMPORT_ACTION_ELSE_IF(FlashActionInitArray,0x42)
  457.         IMPORT_ACTION_ELSE_IF(FlashActionInitObject,0x4)
  458.         IMPORT_ACTION_ELSE_IF(FlashActionTypeOf,0x44)
  459.         IMPORT_ACTION_ELSE_IF(FlashActionTargetPath,0x45)
  460.         IMPORT_ACTION_ELSE_IF(FlashActionEnumerate,0x46)
  461.         IMPORT_ACTION_ELSE_IF(FlashActionAdd2,0x47)
  462.         IMPORT_ACTION_ELSE_IF(FlashActionLess2,0x48)
  463.         IMPORT_ACTION_ELSE_IF(FlashActionEquals2,0x49)
  464.         IMPORT_ACTION_ELSE_IF(FlashActionToNumber,0x4a)
  465.         IMPORT_ACTION_ELSE_IF(FlashActionToString,0x4b)
  466.         IMPORT_ACTION_ELSE_IF(FlashActionPushDuplicate,0x4c)
  467.         IMPORT_ACTION_ELSE_IF(FlashActionStackSwap,0x4d)
  468.         IMPORT_ACTION_ELSE_IF(FlashActionGetMember,0x4e)
  469.         IMPORT_ACTION_ELSE_IF(FlashActionSetMember,0x4f)
  470.         IMPORT_ACTION_ELSE_IF(FlashActionIncrement,0x50)
  471.         IMPORT_ACTION_ELSE_IF(FlashActionDecrement,0x51)
  472.         IMPORT_ACTION_ELSE_IF(FlashActionCallMethod,0x52)
  473.         IMPORT_ACTION_ELSE_IF(FlashActionNewMethod,0x53)
  474.         IMPORT_ACTION_ELSE_IF(FlashActionBitAnd,0x60)
  475.         IMPORT_ACTION_ELSE_IF(FlashActionBitOr,0x61)
  476.         IMPORT_ACTION_ELSE_IF(FlashActionBitXor,0x62)
  477.         IMPORT_ACTION_ELSE_IF(FlashActionBitLShift,0x63)
  478.         IMPORT_ACTION_ELSE_IF(FlashActionBitRShift,0x64)
  479.         IMPORT_ACTION_ELSE_IF(FlashActionBitURShift,0x65)
  480.         IMPORT_ACTION_ELSE_IF(FlashActionStoreRegister,0x87)
  481.  
  482.         IMPORT_ACTION_ELSE_IF(FlashActionDefineFunction, 0x9B)
  483.         IMPORT_ACTION_ELSE_IF(FlashActionConstantPool, 0x88)
  484.         IMPORT_ACTION_ELSE_IF(FlashActionWith, 0x94)
  485.         else
  486.         {
  487.             FlashActionRecord *p = new FlashActionRecord();
  488.             v.push_back(p);
  489.             d.push_back(p);
  490.             (*v[count]).Read(in);
  491.         }
  492.         count ++;
  493.     }
  494.     count = 0;
  495. }
  496.