SWFGradient->addEntry
<<<
SWFGradient SWFMorph->getshape1
>>>

6.59 Ming pour Flash
6 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes Prédefinies
Classes Prédefinies
ming_setcubicthreshold
ming_setscale
ming_useswfversion
SWFAction
SWFBitmap->getHeight
SWFBitmap->getWidth
SWFBitmap
swfbutton_keypress
SWFbutton->addAction
SWFbutton->addShape
SWFbutton->setAction
SWFbutton->setDown
SWFbutton->setHit
SWFbutton->setOver
SWFbutton->setUp
SWFbutton
SWFDisplayItem->addColor
SWFDisplayItem->move
SWFDisplayItem->moveTo
SWFDisplayItem->multColor
SWFDisplayItem->remove
SWFDisplayItem->Rotate
SWFDisplayItem->rotateTo
SWFDisplayItem->scale
SWFDisplayItem->scaleTo
SWFDisplayItem->setDepth
SWFDisplayItem->setName
SWFDisplayItem->setRatio
SWFDisplayItem->skewX
SWFDisplayItem->skewXTo
SWFDisplayItem->skewY
SWFDisplayItem->skewYTo
SWFDisplayItem
SWFFill->moveTo
SWFFill->rotateTo
SWFFill->scaleTo
SWFFill->skewXTo
SWFFill->skewYTo
SWFFill
swffont->getwidth
SWFFont
SWFGradient->addEntry
->SWFGradient
SWFMorph->getshape1
SWFMorph->getshape2
SWFMorph
SWFMovie->add
SWFMovie->nextframe
SWFMovie->output
SWFMovie->remove
SWFMovie->save
SWFMovie->setbackground
SWFMovie->setdimension
SWFMovie->setframes
SWFMovie->setrate
SWFMovie->streammp3
SWFMovie
SWFShape->addFill
SWFShape->drawCurve
SWFShape->drawCurveTo
SWFShape->drawLine
SWFShape->drawLineTo
SWFShape->movePen
SWFShape->movePenTo
SWFShape->setLeftFill
SWFShape->setLine
SWFShape->setRightFill
SWFShape
SWFSprite->add
SWFSprite->nextframe
SWFSprite->remove
SWFSprite->setframes
SWFSprite
SWFText->addString
SWFText->getWidth
SWFText->moveTo
SWFText->setColor
SWFText->setFont
SWFText->setHeight
SWFText->setSpacing
SWFText
SWFTextField->addstring
SWFTextField->align
SWFTextField->setbounds
SWFTextField->setcolor
SWFTextField->setFont
SWFTextField->setHeight
SWFTextField->setindentation
SWFTextField->setLeftMargin
SWFTextField->setLineSpacing
SWFTextField->setMargins
SWFTextField->setname
SWFTextField->setrightMargin
SWFTextField

6.59.50 SWFGradient()Crée un objet gradient

[ Exemples avec swfgradient ]   PHP 4 >= 4.0.5

new  swfgradient ( void )
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.

swfgradient crée un nouvel objet gradient.

Une fois que vous avez ajouté les couleurs à votre gradient, vous pouvez l'utiliser dans des formes, avec la fonction swfshape->addfill .

SWFGradient a la méthode suivante : swfgradient->addentry .

Cet exemple simple affiche un gradient noir-blanc comme fond, et un gradient concentrique au centre.
Exemple avec swfgradient

<?php
  $m
= new SWFMovie();
  
$m->setDimension(320, 240);
  
$s = new SWFShape();
  
// gradient noir-blanc
  
$g = new SWFGradient();
  
$g->addEntry(0.0, 0, 0, 0);
  
$g->addEntry(1.0, 0xff, 0xff, 0xff);
  
$f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT);
  
$f->scaleTo(0.01);
  
$f->moveTo(160, 120);
  
$s->setRightFill($f);
  
$s->drawLine(320, 0);
  
$s->drawLine(0, 240);
  
$s->drawLine(-320, 0);
  
$s->drawLine(0, -240);
  
$m->add($s);
  
$s = new SWFShape();
  
// gradient radial : rouge vers transparent
  
$g = new SWFGradient();
  
$g->addEntry(0.0, 0xff, 0, 0, 0xff);
  
$g->addEntry(1.0, 0xff, 0, 0, 0);
  
$f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT);
  
$f->scaleTo(0.005);
  
$f->moveTo(160, 120);
  
$s->setRightFill($f);
  
$s->drawLine(320, 0);
  
$s->drawLine(0, 240);
  
$s->drawLine(-320, 0);
  
$s->drawLine(0, -240);
  
$m->add($s);
  
header('Content-type: application/x-shockwave-flash');
  
$m->output();
?>

<< SWFGradient >>
SWFGradient->addEntry Ming pour Flash SWFMorph->getshape1