Difference between revisions of "Swf.pl"

From Organic Design wiki
(update for peer)
(Colours)
Line 2: Line 2:
  
 
my $swf= SWF::Builder->new(
 
my $swf= SWF::Builder->new(
FrameRate => 15,
+
FrameRate => 50,
 
FrameSize => [0, 0, 400, 400],
 
FrameSize => [0, 0, 400, 400],
BackgroundColor => 'ffffff'
+
BackgroundColor => 'cccccc'
 
);
 
);
  
 
# Red triangle
 
# Red triangle
 
my $shape = $swf->new_shape
 
my $shape = $swf->new_shape
->fillstyle('ff0000')
+
->fillstyle('009900')
 
->linestyle(1, '000000')
 
->linestyle(1, '000000')
 
->moveto(0,-11)
 
->moveto(0,-11)

Revision as of 12:02, 14 February 2006

use SWF::Builder;

my $swf= SWF::Builder->new( FrameRate => 50, FrameSize => [0, 0, 400, 400], BackgroundColor => 'cccccc' );

  1. Red triangle

my $shape = $swf->new_shape ->fillstyle('009900') ->linestyle(1, '000000') ->moveto(0,-11) ->lineto(10,6) ->lineto(-10,6) ->lineto(0,-11); my $instance = $shape->place; for ( my $x = 0; $x < 400; $x++ ) { $instance->rotate(15)->moveto( $x, 200 ) } $swf->save( "$::peer.swf" );