From 821f517f63748412b3fb47f259a7cc83ef57ceb4 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 5 Sep 2003 14:46:38 +0000 Subject: [PATCH] - Simple test for ming --- ext/ming/tests/swfaction.phpt | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 ext/ming/tests/swfaction.phpt diff --git a/ext/ming/tests/swfaction.phpt b/ext/ming/tests/swfaction.phpt new file mode 100644 index 00000000000..a99d4e24f61 --- /dev/null +++ b/ext/ming/tests/swfaction.phpt @@ -0,0 +1,48 @@ +--TEST-- +Ming: Simple SWFAction() test +--SKIPIF-- + +--FILE-- +addFill(0xff, 0, 0); + $s->setRightFill($f); + + $s->movePenTo(-500,-500); + $s->drawLineTo(500,-500); + $s->drawLineTo(500,500); + $s->drawLineTo(-500,500); + $s->drawLineTo(-500,-500); + + $p = new SWFSprite(); + $i = $p->add($s); + $i->setDepth(1); + $p->nextFrame(); + + for($n=0; $n<5; ++$n) + { + $i->rotate(-15); + $p->nextFrame(); + } + + $m = new SWFMovie(); + $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(6000,4000); + + $i = $m->add($p); + $i->setDepth(1); + $i->moveTo(1000,2000); + $i->setName("box"); + + $m->add(new SWFAction("_root.box._x += 3;")); + $m->nextFrame(); + $m->add(new SWFAction("gotoFrame(0); play();")); + $m->nextFrame(); + + $m->save('./test.swf'); + echo md5_file('./test.swf'), "\n"; + unlink('./test.swf'); +?> +--EXPECT-- +9e47538692393b9915faf3fc7e686cd5