Difference between revisions of "Swf.pl"
From Organic Design wiki
(update for peer) |
|||
| Line 1: | Line 1: | ||
| − | my $ | + | use SWF::Builder; |
| − | my $shape = $ | + | |
| + | my $swf= SWF::Builder->new( | ||
| + | FrameRate => 15, | ||
| + | FrameSize => [0, 0, 400, 400], | ||
| + | BackgroundColor => 'ffffff' | ||
| + | ); | ||
| + | |||
| + | # Red triangle | ||
| + | my $shape = $swf->new_shape | ||
->fillstyle('ff0000') | ->fillstyle('ff0000') | ||
->linestyle(1, '000000') | ->linestyle(1, '000000') | ||
| Line 8: | Line 16: | ||
->lineto(0,-11); | ->lineto(0,-11); | ||
my $instance = $shape->place; | my $instance = $shape->place; | ||
| − | for (my $x = 0; $x < 400; $x++) {$instance->rotate(15)->moveto($x,200)} | + | for ( my $x = 0; $x < 400; $x++ ) { $instance->rotate(15)->moveto( $x, 200 ) } |
| − | $ | + | $swf->save( "$::peer.swf" ); |
Revision as of 11:29, 14 February 2006
use SWF::Builder;
my $swf= SWF::Builder->new( FrameRate => 15, FrameSize => [0, 0, 400, 400], BackgroundColor => 'ffffff' );
- Red triangle
my $shape = $swf->new_shape ->fillstyle('ff0000') ->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" );



