PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SWFMorph> <SWFGradient
Last updated: Fri, 05 Dec 2008

view this page in

SWFGradient->__construct()

(No version information available, might be only in CVS)

SWFGradient->__construct()Crée un objet gradient

Description

SWFGradient
SWFGradient __construct ( void )
Avertissement

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 SWFGradient.

Après avoir ajouter des entrées à votre gradient, vous pouvez utiliser le gradient dans une forme avec la méthode swfshape->addfill().

SWFGradient a les méthodes suivantes : swfgradient->addentry().

Cet exemple simple trace un gradient noir et blanc, en arrière plan et un disque au centre.

Exemple #1 Exemple avec swfgradient()

<?php

  $m 
= new SWFMovie();
  
$m->setDimension(320240);

  
$s = new SWFShape();

  
// premier gradient - noir vers blanc
  
$g = new SWFGradient();
  
$g->addEntry(0.0000);
  
$g->addEntry(1.00xff0xff0xff);

  
$f $s->addFill($gSWFFILL_LINEAR_GRADIENT);
  
$f->scaleTo(0.01);
  
$f->moveTo(160120);
  
$s->setRightFill($f);
  
$s->drawLine(3200);
  
$s->drawLine(0240);
  
$s->drawLine(-3200);
  
$s->drawLine(0, -240);

  
$m->add($s);

  
$s = new SWFShape();

  
// second gradient - gradient radial, depuis le rouge vers transparent
  
$g = new SWFGradient();
  
$g->addEntry(0.00xff000xff);
  
$g->addEntry(1.00xff000);

  
$f $s->addFill($gSWFFILL_RADIAL_GRADIENT);
  
$f->scaleTo(0.005);
  
$f->moveTo(160120);
  
$s->setRightFill($f);
  
$s->drawLine(3200);
  
$s->drawLine(0240);
  
$s->drawLine(-3200);
  
$s->drawLine(0, -240);

  
$m->add($s);

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



add a note add a note User Contributed Notes
SWFGradient->__construct()
There are no user contributed notes for this page.

SWFMorph> <SWFGradient
Last updated: Fri, 05 Dec 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites