Example #1
0
 static function string($buttonrecord, $opts = array())
 {
     $text = '';
     $buttonHasBlendMode = $buttonrecord['ButtonHasBlandMode'];
     $buttonHasFilterList = $buttonrecord['ButtonHasFilterList'];
     $text .= "HasBlandMode:" . $buttonrecord['ButtonHasBlandMode'] . ' HasFilterList:' . $buttonrecord['ButtonHasFilterList'] . "\n\t\t";
     foreach (array('StateHitTest', 'StateDown', 'StateOver', 'StateUp') as $label) {
         $text .= $label . ':' . $buttonrecord['Button' . $label] . ' ';
     }
     $text .= "\n\t\t";
     $text .= "CharacterID:{$buttonrecord['CharacterID']} PlaceDepth:{$buttonrecord['PlaceDepth']}";
     $text .= "\n";
     $opts['indent']++;
     $text .= IO_SWF_Type_MATRIX::string($buttonrecord['PlaceMatrix'], $opts) . "\n";
     if ($opts['tagCode'] == 34) {
         // DefineButton2
         $text .= "\t\tColorTransform:" . IO_SWF_Type_CXFORMWITHALPHA::string($buttonrecord['ColorTransform']) . ' ';
     } else {
         $text .= 'ColorTransform:' . IO_SWF_Type_CXFORM::string($buttonrecord['ColorTransform']) . ' ';
     }
     if ($opts['tagCode'] == 34 && $opts['Version'] >= 8) {
         // DefineButton2 & SWF8 later
         if ($buttonHasFilterList == 1) {
             $text .= 'FilterList:' . IO_SWF_Type_FILTERLIST::string($buttonrecord['FilterList']) . "\n";
         }
         if ($buttonHasBlendMode == 1) {
             $text .= 'BlendMode:' . $buttonrecord['BlendMode'] . "\n";
         }
     }
     return $text;
 }
Example #2
0
 function dumpContent($tagCode, $opts = array())
 {
     if (is_null($this->_characterId) === false) {
         echo "\tCharacterId: " . $this->_characterId . "\n";
     }
     echo "\tMove: " . ($this->_placeFlagMove ? 'true' : 'false') . "\n";
     if (is_null($this->_depth) === false) {
         echo "\tDepth: " . $this->_depth . "\n";
     }
     if (is_null($this->_matrix) === false) {
         $opts['indent'] = 2;
         echo "\tMatrix:\n" . IO_SWF_Type_MATRIX::string($this->_matrix, $opts) . "\n";
     }
     if (is_null($this->_colorTransform) === false) {
         if ($tagCode == 4) {
             // PlaceObject
             echo "\tColorTransform: " . IO_SWF_Type_CXFORM::string($this->_colorTransform) . "\n";
         } else {
             echo "\tColorTransform: " . IO_SWF_Type_CXFORMWITHALPHA::string($this->_colorTransform) . "\n";
         }
     }
     if (is_null($this->_ratio) === false) {
         echo "\tRatio: " . $this->_ratio . "\n";
     }
     if (is_null($this->_name) === false) {
         echo "\tName:" . $this->_name . "\n";
     }
     if (is_null($this->_clipDepth) === false) {
         echo "\tClipDepth:" . $this->_clipDepth . "\n";
     }
     if (is_null($this->_clipActions) === false) {
         echo "\tClipActions:\n";
         echo "\t" . IO_SWF_Type_CLIPACTIONS::string($this->_clipActions, $opts) . "\n";
     }
 }