Problem with circle in mingscript
Ruprecht Helms <[email protected]> 16 Sep 2003 21:09:01 +0200
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, within a script I want morph a circleshape into another form. On running the script I get no result. No codeerror will be shown. What is my problem. In addition my script. Regards, Ruprecht _______________________________________________ ming-fun mailing list [email protected] http://www.opaque.net/mailman/listinfo/ming-fun
morph_2.php
(text/plain, 4.2 KB)
<?
$s11 = new SWFShape();
$f11 = $s11->addFill(4, 82,249 );
$s11->setRightFill($f11);
//draw corners for the shape
$s11->drawLine(800, 0);
$s11->drawLine(0, 2);
$s11->drawLine(-800, 0);
$s11->drawLine(0, -2);
$s12 = new SWFShape();
$f12 = $s12->addFill(4,82,249);
$s12->setRightFill($f12);
//draw corners for the shape
$s12->drawLine(2,0);
$s12->drawLine(0,370);
$s12->drawLine(-2,0);
$s12->drawLine(0,-370);
$p11 = new SWFSprite();
$p12 = new SWFSprite();
//add seventh bitmap shape to movie
$p11->add($s11);
$i11 = $p11->add($s11);
$p11->nextFrame();
//add seventh bitmap shape to movie
$p12->add($s12);
$i12 = $p12->add($s12);
$p12->nextFrame();
$grad = new SWFGradient();
$grad->addEntry(0.0, 255, 255, 255);
$grad->addEntry(0.2, 255, 255, 0);
$grad->addEntry(0.4, 255, 0, 0);
$grad->addEntry(0.6, 255, 0, 255);
$grad->addEntry(0.8, 0, 0, 255);
$grad->addEntry(1.0, 0, 0, 0);
$p1 = new SWFMorph();
$s = $p1->getShape1();
$s->setLine(6,0,0,0);
$f=$s->addFill($grad, SWFILL_LINEAR_GRADIENT);
$s->movepenTo(-10,-10);
$s->setRightFill($f);
//$p1($s, 500, 500, 150);
$s = $p1->getShape2();
$s->setLine(0,0,0,0);
$s->setLeftFill($s->addFill(0, 0, 0xff));
$s->movepenTo(0,-10);
$s->drawLine(10,10);
$s->drawLine(-10,10);
$s->drawLine(-10,-10);
$s->drawLine(10,-10);
$p2 = new SWFMorph();
$s = $p2->getShape1();
$s->setLine(6,0,0,0);
$s->setLeftFill($s->addFill(0xff, 0, 0));
$s->movepenTo(-10,-10);
$s->drawLine(50,0);
$s->drawLine(0,50);
$s->drawLine(-50,0);
$s->drawLine(0,-50);
$s = $p2->getShape2();
$s->setLine(0,0,0,0);
$s->setLeftFill($s->addFill(0, 0, 0xff));
$s->movepenTo(0,-10);
$s->drawLine(10,10);
$s->drawLine(-10,10);
$s->drawLine(-10,-10);
$s->drawLine(10,-10);
$a = new SWFShape();
$a->setRightFill($a->addFill(0, 0, 0xff));
$a->movepenTo(0, -10);
$a->drawLine(10, 10);
$a->drawLine(-10, 10);
$a->drawLine(-10, -10);
$a->drawLine(10, -10);
//$s2 = new SWFShape();
// $s2->setLine(1,255,255,255);
// $s2->movep1enTo(0, -10);
// $s2->drawline(100,0);
// $s2->drawline(0,10);
// $s2->drawline(-1000,0);
// $s2->drawline(0,-10);
// $p1 = new SWFSp1rite();
// $p12 = new SWFSp1rite();
// add our bitmap1 shap1e to this movieclip1
// $p1->add($s2);
// $t = $p1->add($s2);
// $p1->nextFrame();
$m = new SWFMovie();
$m->setDimension(320, 240);
$m->setBackground(0xff, 0xff, 0xff);
//Add movieclip11 to our main movie's timeline
//Much like dragging a symbol from the library in Flash.
$membranline1 = $m->add($p11);
//move movieobject to this position in movie1
$membranline1->moveTo(50,30);
$membranline1 = $m->add($p11);
$membranline1->moveTo(-50,110);
$membranline1 = $m->add($p11);
$membranline1->moveTo(160, 250);
//Add movieclip12 to our main movie's timeline
//Much like dragging a symbol from the library in Flash.
$membranline2 = $m->add($p12);
//move movieobject to this position in movie1
$membranline2->moveTo(-50, 110);
$membranline2 = $m->add($p12);
$membranline2->moveTo(960, 230);
$membranline2 = $m->add($p12);
$membranline2->moveTo(1020, 150);
$i = $m->add($p1);
$i->moveTo(10,120);
$j = $m->add($p2);
$j->moveTo(300,120);
$b = $m->add($a);
$b->moveTo(20,60);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(310,60);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(30,90);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(305,90);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(35,150);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(320,150);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(40,180);
//$b->scaleTo(6.0);
$b = $m->add($a);
$b->moveTo(295,180);
//$b->scaleTo(6.0);
for($r=0.0; $r<=1.0; $r+=0.1)
{
$i->setRatio($r);
$j->setRatio($r);
$m->nextFrame();
}
//header('Content-typ1e: application/x-shockwave-flash');
//$m->save("morph.swf");
//$m->output();
?>