| 1 | package IO::SWF::Former; | ||
| 2 | |||
| 3 | use base 'IO::SWF'; | ||
| 4 | |||
| 5 | sub form { | ||
| 6 | my $self = shift; | ||
| 7 | foreach my $tag (@{$self->_tags}) { | ||
| 8 | if ($tag->{'Code'} == 26) { | ||
| 9 | # 26: // PlaceObject2 | ||
| 10 | $self->_form_26($tag); | ||
| 11 | last; | ||
| 12 | } | ||
| 13 | } | ||
| 14 | } | ||
| 15 | |||
| 16 | sub _form_26 { | ||
| 17 | my ($self, $tag) = @_; # $tag : PlaceObject2 | ||
| 18 | my $reader = IO::SWF::Bit->new(); | ||
| 19 | $reader->input($tag->{'Content'}); | ||
| 20 | $tag->placeFlag($reader->getUI8()); | ||
| 21 | $tag->depth($reader->getUI16LE()); | ||
| 22 | if ($tag->placeFlag & 0x02) { | ||
| 23 | $tag->characterId($reader->getUI16LE()); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | 1; |