Services webmasters
Partenaires
Jeux concours gratuits
 
swfdisplayitem->rotate
<<<
swfdisplayitem->rotateto swfdisplayitem->scale
>>>

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.30 swfdisplayitem->rotateto()Tourne un objet en angle absolu

[ Exemples avec swfdisplayitem.rotateto ]   CVS uniquement

void  swfdisplayitem->rotateto ( float   degrees )
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->rotateto tourne l'objet jusqu'à l'angle absolu degrees , en degrés.

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

Cet exemple amène trois chaînes tournoyantes depuis le fond de l'écran. Plutôt sympa.
Exemple avec swfdisplayitem->rotateto

<?php
  $thetext
=  "ming!";
  
$f = new SWFFont("Bauhaus 93.fdb");
  
$m = new SWFMovie();
  
$m->setRate(24.0);
  
$m->setDimension(2400, 1600);
  
$m->setBackground(0xff, 0xff, 0xff);
  
// Les fonctions avec un nombre d'arguments sont vraiment une bonne idées.
  // Sincèrement!
  
function text($r, $g, $b, $a, $rot, $x, $y, $scale, $string)
  {
    global
$f, $m;
    
$t = new SWFText();
    
$t->setFont($f);
    
$t->setColor($r, $g, $b, $a);
    
$t->setHeight(960);
    
$t->moveTo(-($f->getWidth($string))/2, $f->getAscent$i = $m->add($t);
    
$i->x = $x;
    
$i->y = $y;
    
$i->rot = $rot;
    
$i->s = $scale;
    
$i->rotateTo($rot);
    
$i->scale($scale, $scale);
    
// mais les modification sont locales à une fonction, donc il faut
    // retourner l'objet modifié. Pas pratique...
    
return $i;
}
  function
step($i)
  {
    
$oldrot = $i->rot;
    
$i->rot = 19*$i->rot/20;
    
$i->x = (19*$i->x + 1200)/20;
    
$i->y = (19*$i->y + 800)/20;
    
$i->s = (19*(
$i->s, $i->s);
    
$i->moveTo($i->x, $i->y);
    return
$i;
  }
  
// Alors? &Ccedil;a valait la peine, non?
  
$i1 = text(0xff, 0x33, 0x33, 0xff, 900, 1200, 800, 0.03, $thetext);
  
$i2 = text(0x00, 0x33, 0xff, 0x7f, -560, 1200, 800, 0.04, $thetext);
  
$i3 = text(0xff, 0xff, 0xff, 0x9f, 180, 1200, 800, 0.001, $thetext);
  for(
$i=1; $i<=100; ++$i)
  {
    
$i1 = step($i1);
    
$i2 = step($i2);
    
$i3 = step

Voir aussi swfdisplayitem->rotate .

<< swfdisplayitem->rotateto >>
swfdisplayitem->rotate Ming pour Flash swfdisplayitem->scale
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -