setRate(5); $movie->setDimension(400,400); $morph = new SWFMorph(); $shape1 = $morph->getShape1(); $shape2 = $morph->getShape2(); $shape1->setLine(2, 0xff, 0x0, 0x0); $shape1->movePenTo(200,200); $shape1->drawCircle(100); $shape2->setLine(1, 0x0, 0x0, 0xff); $shape2->movePenTo(200, 200); $shape2->drawLine(1,1); $dMorph = $movie->add($morph); $sprite = new SWFSprite(); $slider = new SWFShape(); $slider->setLine(10,0xff,0x0,0x0); $slider->movePenTo(0, 0); $slider->drawLineTo(0, 15); $sprite->add($slider); $sprite->nextFrame(); $dSprite = $movie->add($sprite); $frames = 50; $width = 400; $sliderAction = " isPlaying = true; if(drag) { x = _root._xmouse; dest_frame = x * $frames / $width; _root.gotoAndStop(int(dest_frame)); isPlaying = false; } else { pos = ($width / $frames * _root._currentframe); this._x = pos; this._y = 0; } if(!isPlaying) { _root.play(); isPlaying = true; } "; $startDrag = "startDrag(this, 0, 0, 400, 0, 1); drag = true;"; $stopDrag = "stopDrag(); drag = false;"; $dSprite->addAction(new SWFAction($sliderAction), SWFACTION_ENTERFRAME); $dSprite->addAction(new SWFAction($startDrag), SWFACTION_MOUSEDOWN); $dSprite->addAction(new SWFAction($stopDrag), SWFACTION_MOUSEUP); for($r=0.0; $r<=1.0; $r+=0.02) { $dMorph->setRatio($r); $movie->nextFrame(); } $movie->save("seek.swf");