#!/usr/bin/perl -w

=head1 NAME

swf-scripter - Create simple animations via a script

=cut

=head1 SYNOPSIS

  swf-scripter [options] [input1] [input2] .. [inputN]

  Help Options:

   --help        Show the help information for this script.
   --manual      Read the manual for this script.

=cut

=head1 ABOUT

swf-scripter is a simple wrapper around the B<SWF::Scripter> library,
and it allows for simple animations or slideshows to be created.

Usage is as simple as given an input file as a parameter:

=for example begin

   # create movie
   create 320,240

   # set the background to be red
   clear 0,0,0

   # load an image at 0,0
   load 0,0, foo.jpg

   # save the result
   save foo.swf

=for example end

=cut

=head1 AUTHOR

 Steve
 --
 http://www.steve.org.uk/

=cut

=head1 LICENSE

Copyright (c) 2010 by Steve Kemp.  All rights reserved.

This module is free software;
you can redistribute it and/or modify it under
the same terms as Perl itself.
The LICENSE file contains the full text of the license.

=cut



use strict;
use warnings;

use Getopt::Long;
use Pod::Usage;
use SWF::Scripter;



my $HELP   = 0;
my $MANUAL = 0;

#
#  Parse options.
#
if (
    !GetOptions(

        # Help options
        "help",   \$HELP,
        "manual", \$MANUAL,
    ) )
{
    exit;
}

pod2usage(1) if $HELP;
pod2usage( -verbose => 2 ) if $MANUAL;

#
#  Create the helper
#
my $script = SWF::Scripter->new();

#
#  Read stdin/any named files.
#
$script->parse_string( join '', <> );

#
#  All done.
#
exit;
