| The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
|

Home Multiple-Image Network Graphics An Animated MNG |
||
|
||
|
An Animated MNG
As always, we begin with MHDR, which defines the overall size of the
image area. I've also included a gamma chunk so that the (nighttime)
animation won't look too dark or too bright on other computer
systems. The animation timing is set by the FRAM chunk, and then we
begin loading sprite data for
The complete eight-reindeer version would be very similar, but instead of
defining full clones of the sprite frames, each remaining reindeer would
be represented by partial clones of the six original poses. In effect,
a partial clone is an empty object: it has its own object ID, visibility,
and location, but it points at another object for its image data--in this
case, at one of the six existing poses. So the seven remaining
reindeer would be represented by 42 CLON chunks, of which seven would have
the potential-visibility flag turned on. The loop would now include a total
of eight SHOW chunks, each advancing one of the reindeer sprite's poses; a
single MOVE chunk would still suffice to move all eight forward. Of
course, this is still not quite the original design; this version has all
eight reindeer galloping synchronously. To have them gallop at different
rates would require separate FRAM chunks for each one.[98]
|
||
Home Multiple-Image Network Graphics An Animated MNG |
||