示例#1
0
 static function parse(&$reader, $opts = array())
 {
     $clipactions = array();
     $clipactions['Reserved'] = $reader->getUI16LE();
     // must be 0
     $clipactions['AllEventFlags'] = IO_SWF_Type_CLIPEVENTFLAGS::parse($reader, $opts);
     $clipActionRecords = array();
     while (true) {
         if ($opts['Version'] <= 5) {
             if ($reader->getUI16LE() == 0) {
                 break;
             }
             $reader->incrementOffset(-2, 0);
             // 2 bytes back
         } else {
             if ($reader->getUI32LE() == 0) {
                 break;
             }
             $reader->incrementOffset(-4, 0);
             // 4 bytes back
         }
         $clipActionRecords[] = IO_SWF_Type_CLIPACTIONRECORD::parse($reader, $opts);
     }
     $clipactions['ClipActionRecords'] = $clipActionRecords;
     return $clipactions;
 }
示例#2
0
 static function parse(&$reader, $opts = array())
 {
     $clipactionrecord = array();
     $clipactionrecord['EventFlags'] = IO_SWF_Type_CLIPEVENTFLAGS::parse($reader, $opts);
     $clipactionrecord['ActionRecordSize'] = $reader->getUI32LE();
     if ($clipactionrecord['EventFlags']['ClipEventKeyPress'] == 1) {
         $clipactionrecord['KeyCode'] = $reader->getUI8();
     }
     $actions = array();
     while ($reader->getUI8() != 0) {
         $reader->incrementOffset(-1, 0);
         // 1 byte back
         $action = IO_SWF_Type_Action::parse($reader);
         $actions[] = $action;
     }
     $clipactionrecord['Actions'] = $actions;
     return $clipactionrecord;
 }