NAME
SWF::File - Create SWF file.
SYNOPSIS
use SWF::File;
$swf = SWF::File->new('movie.swf');
# set header data
$swf->Version(4);
$swf->FrameSize( 0, 0, 1000, 1000);
$swf->FrameRate(12);
# set tags
$tag = SWF::Element::Tag->new( .... )
$tag->pack($swf);
....
# save SWF and close
$swf->close;
DESCRIPTION
SWF::File module can be used to make SWF (Macromedia Flash(R)) movie. SWF::File is a subclass of SWF::BinStream::Write, so you can pack SWF::Element::Tags in it.
METHODS
- SWF::File->new( $filename )
-
Creates a new SWF file.
- $swf->Version( [$version] )
-
Sets and gets SWF version number. Default is 5. You should set it to default if you don't know which version the SWF tags you use are supported with. Neither SWF::File nor SWF::Element support the version control of the specific tags.
- $swf->FrameRate( [$framerate] )
-
Sets and gets the frame rate of the movie (frames per second). Default is 12.
- $swf->FrameSize( [$x1, $y1, $x2, $y2] )
-
Sets the bounding box size of the movie frame in TWIPs (1 TWIP = 1/20 pixel), and gets the size as SWF::Element::RECT object. Default is (0, 0, 12800, 9600).
- $swf->FrameCount( [$count] )
-
Sets and gets the frame count of the movie. Usually you don't need to set because SWF::File object automatically count the ShowFrame tags. If you want to set the different value, you should set it just before $swf->close.
- $swf->close
-
Saves SWF to the file and closes it.
COPYRIGHT
Copyright 2001 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
SWF file format and SWF file reference in SWF SDK.