Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Ming functions for Flash : SWFShape->setLine()

SWFShape->setLine()

Sets the shape's line style ()

Example 1348. swfshape->setline() example

<?php
$s
= new SWFShape();
$f1 = $s->addFill(0xff, 0, 0);
$f2 = $s->addFill(0xff, 0x7f, 0);
$f3 = $s->addFill(0xff, 0xff, 0);
$f4 = $s->addFill(0, 0xff, 0);
$f5 = $s->addFill(0, 0, 0xff);

// bug: have to declare all line styles before you use them
$s->setLine(40, 0x7f, 0, 0);
$s->setLine(40, 0x7f, 0x3f, 0);
$s->setLine(40, 0x7f, 0x7f, 0);
$s->setLine(40, 0, 0x7f, 0);
$s->setLine(40, 0, 0, 0x7f);

$f = new SWFFont('Techno.fdb');

$s->setRightFill($f1);
$s->setLine(40, 0x7f, 0, 0);
$s->drawGlyph($f, '!');
$s->movePen($f->getWidth('!'), 0);

$s->setRightFill($f2);
$s->setLine(40, 0x7f, 0x3f, 0);
$s->drawGlyph($f, '#');
$s->movePen($f->getWidth('#'), 0);

$s->setRightFill($f3);
$s->setLine(40, 0x7f, 0x7f, 0);
$s->drawGlyph($f, '%');
$s->movePen($f->getWidth('%'), 0);

$s->setRightFill($f4);
$s->setLine(40, 0, 0x7f, 0);
$s->drawGlyph($f, '*');
$s->movePen($f->getWidth('*'), 0);

$s->setRightFill($f5);
$s->setLine(40, 0, 0, 0x7f);
$s->drawGlyph($f, '@');

$m = new SWFMovie();
$m->setDimension(3000,2000);
$m->setRate(12.0);
$i = $m->add($s);
$i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2);

header('Content-type: application/x-shockwave-flash');
$m->output();
?>

Related Examples ( Source code ) » swfshape.setline




Change Language


Follow Navioo On Twitter
SWFAction
SWFAction->__construct()
SWFBitmap
SWFBitmap->__construct()
SWFBitmap->getHeight()
SWFBitmap->getWidth()
SWFButton
SWFButton->__construct()
SWFButton->addAction()
SWFButton->addASound()
SWFButton->addShape()
SWFButton->setAction()
SWFButton->setDown()
SWFButton->setHit()
SWFButton->setMenu()
SWFButton->setOver()
SWFButton->setUp()
SWFDisplayItem
SWFDisplayItem->addAction()
SWFDisplayItem->addColor()
SWFDisplayItem->endMask()
SWFDisplayItem->getRot()
SWFDisplayItem->getX()
SWFDisplayItem->getXScale()
SWFDisplayItem->getXSkew()
SWFDisplayItem->getY()
SWFDisplayItem->getYScale()
SWFDisplayItem->getYSkew()
SWFDisplayItem->move()
SWFDisplayItem->moveTo()
SWFDisplayItem->multColor()
SWFDisplayItem->remove()
SWFDisplayItem->rotate()
SWFDisplayItem->rotateTo()
SWFDisplayItem->scale()
SWFDisplayItem->scaleTo()
SWFDisplayItem->setDepth()
SWFDisplayItem->setMaskLevel()
SWFDisplayItem->setMatrix()
SWFDisplayItem->setName()
SWFDisplayItem->setRatio()
SWFDisplayItem->skewX()
SWFDisplayItem->skewXTo()
SWFDisplayItem->skewY()
SWFDisplayItem->skewYTo()
SWFFill
SWFFill->moveTo()
SWFFill->rotateTo()
SWFFill->scaleTo()
SWFFill->skewXTo()
SWFFill->skewYTo()
SWFFont
SWFFont->__construct()
SWFFont->getAscent()
SWFFont->getDescent()
SWFFont->getLeading()
SWFFont->getShape()
SWFFont->getUTF8Width()
SWFFont->getWidth()
SWFFontChar
SWFFontChar->addChars()
SWFFontChar->addUTF8Chars()
SWFGradient
SWFGradient->__construct()
SWFGradient->addEntry()
SWFMorph
SWFMorph->__construct()
SWFMorph->getShape1()
SWFMorph->getShape2()
SWFMovie
SWFMovie->__construct()
SWFMovie->add()
SWFMovie->addExport()
SWFMovie->addFont()
SWFMovie->importChar()
SWFMovie->importFont()
SWFMovie->labelFrame()
SWFMovie->nextFrame()
SWFMovie->output()
SWFMovie->remove()
SWFMovie->save()
SWFMovie->saveToFile()
SWFMovie->setbackground()
SWFMovie->setDimension()
SWFMovie->setFrames()
SWFMovie->setRate()
SWFMovie->startSound()
SWFMovie->stopSound()
SWFMovie->streamMP3()
SWFMovie->writeExports()
SWFPrebuiltClip
SWFPrebuiltClip->__construct()
SWFShape
SWFShape->__construct()
SWFShape->addFill()
SWFShape->drawArc()
SWFShape->drawCircle()
SWFShape->drawCubic()
SWFShape->drawCubicTo()
SWFShape->drawCurve()
SWFShape->drawCurveTo()
SWFShape->drawGlyph()
SWFShape->drawLine()
SWFShape->drawLineTo()
SWFShape->movePen()
SWFShape->movePenTo()
SWFShape->setLeftFill()
SWFShape->setLine()
SWFShape->setRightFill()
SWFSound
SWFSound
SWFSoundInstance
SWFSoundInstance->loopCount()
SWFSoundInstance->loopInPoint()
SWFSoundInstance->loopOutPoint()
SWFSoundInstance->noMultiple()
SWFSprite
SWFSprite->__construct()
SWFSprite->add()
SWFSprite->labelFrame()
SWFSprite->nextFrame()
SWFSprite->remove()
SWFSprite->setFrames()
SWFSprite->startSound()
SWFSprite->stopSound()
SWFText
SWFText->__construct()
SWFText->addString()
SWFText->addUTF8String()
SWFText->getAscent()
SWFText->getDescent()
SWFText->getLeading()
SWFText->getUTF8Width()
SWFText->getWidth()
SWFText->moveTo()
SWFText->setColor()
SWFText->setFont()
SWFText->setHeight()
SWFText->setSpacing()
SWFTextField
SWFTextField->__construct()
SWFTextField->addChars()
SWFTextField->addString()
SWFTextField->align()
SWFTextField->setBounds()
SWFTextField->setColor()
SWFTextField->setFont()
SWFTextField->setHeight()
SWFTextField->setIndentation()
SWFTextField->setLeftMargin()
SWFTextField->setLineSpacing()
SWFTextField->setMargins()
SWFTextField->setName()
SWFTextField->setPadding()
SWFTextField->setRightMargin()
SWFVideoStream
SWFVideoStream->__construct()
SWFVideoStream->getNumFrames()
SWFVideoStream->setDimension()
ming_keypress
ming_setcubicthreshold
ming_setscale
ming_setswfcompression
ming_useconstants
ming_useswfversion
eXTReMe Tracker