Esempio n. 1
0
 /**
  * Process the raw data from a binary stream
  * 
  * @return  void
  */
 public function processData(Woops_Swf_Binary_Stream $stream)
 {
     // Checks if we have data, meaning we have a MD5-encrypted password
     if (!$stream->endOfStream()) {
         // Gets the MD5-encrypted password
         $this->_password = $stream->nullTerminatedString();
     }
 }
Esempio n. 2
0
 /**
  * Process the raw data from a binary stream
  * 
  * @return  void
  */
 public function processData(Woops_Swf_Binary_Stream $stream)
 {
     // Gets the label
     $this->_label = $stream->nullTerminatedString();
     // Checks if we have a named anchor
     if (!$stream->endOfStream()) {
         // Sets the named anchor flag
         $this->_namedAnchor = (bool) $stream->unsignedChar();
     }
 }
Esempio n. 3
0
 /**
  * Process the raw data from a binary stream
  * 
  * @return  void
  */
 public function processData(Woops_Swf_Binary_Stream $stream)
 {
     // Gets the sprite ID and the frame count
     $this->_spriteId = $stream->littleEndianUnsignedShort();
     $this->_frameCount = $stream->littleEndianUnsignedShort();
     // Resets the tag array
     $this->_tags = array();
     // Process the tags
     while (!$stream->endOfStream()) {
         // Gets thge tag record header
         $tagHeader = $stream->littleEndianUnsignedShort();
         // Gets the tag type
         $tagType = $tagHeader >> 6;
         // Gets the tag length
         $tagLength = $tagHeader & 0x3f;
         // Checks for a 32bit length
         if ($tagLength === 0x3f) {
             // Tag is long
             $tagLength = $stream->littleEndianUnsignedLong();
         }
         // Creates the tag
         $tag = $this->newTag($tagType);
         // Creates a binary stream with the tag data
         $tagData = new Woops_Swf_Binary_Stream($stream->read($tagLength));
         // Processes the tag data
         $tag->processData($tagData);
     }
 }