SWFDisplayItem->setName
<<<
SWFDisplayItem->setRatio SWFDisplayItem->skewX
>>>

6.21 Ming pour Flash
6 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes pré-définies
Classes pré-définies
ming_keypress
ming_setcubicthreshold
ming_setscale
ming_useConstants
ming_useswfversion
SWFAction
SWFBitmap->getHeight
SWFBitmap->getWidth
SWFBitmap
SWFbutton->addAction
SWFButton::addASound
SWFbutton->addShape
SWFbutton->setAction
SWFbutton->setdown
SWFbutton->setHit
SWFButton::setMenu
SWFbutton->setOver
SWFbutton->setUp
SWFbutton
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->moveTo
SWFFill->rotateTo
SWFFill->scaleTo
SWFFill->skewXTo
SWFFill->skewYTo
SWFFill
SWFFont::getAscent
SWFFont::getDescent
SWFFont::getLeading
SWFFont::getShape
SWFFont::getUTF8Width
swffont->getwidth
SWFFont
SWFFontChar::addChars
SWFFontChar::addUTF8Chars
SWFGradient->addEntry
SWFGradient
SWFMorph->getshape1
SWFMorph->getshape2
SWFMorph
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
SWFMovie
SWFPrebuiltClip
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
SWFShape
SWFSound
SWFSoundInstance::loopCount
SWFSoundInstance::loopInPoint
SWFSoundInstance::loopOutPoint
SWFSoundInstance::noMultiple
swfsprite->add
SWFSprite::labelFrame
SWFSprite->nextframe
SWFSprite->remove
SWFSprite->setframes
SWFSprite::startSound
SWFSprite::stopSound
SWFSprite
SWFText->addString
SWFText::addUTF8String
SWFText::getAscent
SWFText::getDescent
SWFText::getLeading
SWFText::getUTF8Width
SWFText->getWidth
SWFText->moveTo
SWFText->setColor
SWFText->setFont
SWFText->setHeight
SWFText->setSpacing
SWFText
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
SWFTextField
SWFVideoStream::getNumFrames
SWFVideoStream::setDimension
SWFVideoStream

6.21.49 SWFDisplayItem->setRatio()Modifie le ratio de l'objet

[ Exemples avec swfdisplayitem.setratio ]   CVS uniquement

void  swfdisplayitem->setratio ( float   ratio )
Attention

Cette fonction est EXPERIMENTALE . Cela signifie que le comportement de cette fonction, son nom et concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS! Soyez-en conscient, et utilisez cette fonction à vos risques et périls.

SWFDisplayItem->setRatio modifie le ratio de l'objet, et le fixe à ratio . Uniquement utile pour les morphings.

L'objet peut être swfshape , swfbutton , swftext ou swfsprite . Il doit avoir été ajouté à une animation avec la fonction swfmovie->add .

Cet exemple simple effectue un morphing délicat de trois cercles concentriques.
Exemple swfdisplayitem->setname

<?php
$p
= new SWFMorph();
$g = new SWFGradient();
$g->addEntry(0.0, 0, 0, 0);
$g->addEntry(0.16, 0xff, 0xff, 0xff);
$g->addEntry(0.32, 0, 0, 0);
$g->addEntry(0.48, 0xff, 0xff, 0xff);
$g->addEntry(0.64, 0, 0, 0);
$g->addEntry(0.80, 0xff, 0xff, 0xff);
$g->addEntry(1.00, 0, 0, 0);
$s = $p->getShape1();
$f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT);
$f->scaleTo(0.05);
$s->setLeftFill($f);
$s->movePenTo(-160, -120);
$s->drawLine(320, 0);
$s->drawLine(0, 240);
$s->drawLine(-320, 0);
$s->drawLine(0, -240);
$g = new SWFGradient();
$g->addEntry(0.0, 0, 0, 0);
$g->addEntry(0.16, 0xff, 0, 0);
$g->addEntry(0.32, 0, 0, 0);
$g->addEntry(0.48, 0, 0xff, 0);
$g->addEntry(0.64, 0, 0, 0);
$g->addEntry(0.80, 0, 0, 0xff);
$g->addEntry(1.00, 0, 0, 0);
$s = $p->getShape2();
$f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT);
$f->scaleTo(0.05);
$f->skewXTo(1.0);
$s->setLeftFill($f);
$s->movePenTo(-160, -120);
$s->drawLine(320, 0);
$s->drawLine(0, 240);
$s->drawLine(-320, 0);
$s->drawLine(0, -240);
$m = new SWFMovie();
$m->setDimension(320, 240);
$i = $m->add($p);
$i->moveTo(160, 120);
for(
$n=0; $n<=1.001; $n+=0.01)
{
  
$i->setRatio($n);
  
$m->nextFrame();
}
header('Content-type: application/x-shockwave-flash');
$m->output();
?>

<< SWFDisplayItem->setRatio >>
SWFDisplayItem->setName Ming pour Flash SWFDisplayItem->skewX