#!/usr/bin/perl -w
use strict;
use SWF ("Movie", "Shape", "Text");
use SWF::Constants qw(:Text);

SWF::setVersion(6);

my $m = new SWF::Movie;
$m->setBackground(0xFF,0x66,0);
$m->setDimension(800,600);
$m->setRate(10);

my $s = new SWF::Shape;
$s->setLine(40,0,0,0);
$s->drawLine(250,340);

my $f = new SWF::Font("../../fonts/_sans.fdb");

my $t = new SWF::TextField(SWFTEXTFIELD_DRAWBOX|SWFTEXTFIELD_USEFONT);
$t->setFont($f);
$t->setBounds(200,30);
$t->addString("bla");
$t->setName("v");

open(AS,"xml01.as") or die("Couldn't load xml.as: $!\n");
my @as=<AS>;

my $as=new SWF::Action("@as");

my $s_i1 =$m->add($s);

my $t_i1 =$m->add($t);
my $t_i2 =$m->add($t);


$t_i1->moveTo(100,200);
$t_i2->moveTo(100,250);
$t_i1->setName("tf1");
$t_i2->setName("tf2");
$m->nextFrame;

$m->add($as);

$m->nextFrame;

$m->nextFrame;
$m->save("$0.swf");
