Services webmasters
Partenaires
Jeux concours gratuits
 
swfdisplayitem->setname
<<<
swfdisplayitem->setratio swfdisplayitem->skewx
>>>

7.58 Ming pour Flash
7 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
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

7.58.35 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$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 (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
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -