Services webmasters
Partenaires
Jeux concours gratuits
 
Constantes prédefinies
<<<
Exemples swf_actiongeturl
>>>

7.97 Shockwave Flash
7 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes prédefinies
->Exemples
swf_actiongeturl
swf_actiongotoframe
swf_actiongotolabel
swf_actionnextframe
swf_actionplay
swf_actionprevframe
swf_actionsettarget
swf_actionstop
swf_actiontogglequality
swf_actionwaitforframe
swf_addbuttonrecord
swf_addcolor
swf_closefile
swf_definebitmap
swf_definefont
swf_defineline
swf_definepoly
swf_definerect
swf_definetext
swf_endbutton
swf_enddoaction
swf_endshape
swf_endsymbol
swf_fontsize
swf_fontslant
swf_fonttracking
swf_getbitmapinfo
swf_getfontinfo
swf_getframe
swf_labelframe
swf_lookat
swf_modifyobject
swf_mulcolor
swf_nextid
swf_oncondition
swf_openfile
swf_ortho
swf_ortho2
swf_perspective
swf_placeobject
swf_polarview
swf_popmatrix
swf_posround
swf_pushmatrix
swf_removeobject
swf_rotate
swf_scale
swf_setfont
swf_setframe
swf_shapearc
swf_shapecurveto
swf_shapecurveto3
swf_shapefillbitmapclip
swf_shapefill swf_startdoaction
swf_startshape
swf_startsymbol
swf_textwidth
swf_translate
swf_viewport

7.97.7 Exemples

Une fois que vous avez réussi à installer PHP avec Shockwave Flash, vous pouvez créer des animations Flash avec PHP. Vous serez surpris du résultat. Essayez donc ceci :
Exemple SWF

<?php
  swf_openfile
("test.swf", 256, 256, 30, 1, 1, 1);
  
swf_ortho2 (-100, 100, -100, 100);
  
swf_defineline (1, -70, 0, 70, 0, .2);
  
swf_definerect (4, 60, -10, 70, 0, 0);
  
swf_definerect (5, -60, 0, -70, 10, 0);
  
swf_addcolor (0, 0, 0, 0);

  
swf_definefont (10, "Mod");
  
swf_fontsize (5);
  
swf_fontslant (10);
  
swf_definetext (11, "This be Flash wit PHP!", 1);

  
swf_pushmatrix ();
  
swf_translate (-50, 80, 0);
  
swf_placeobject (11, 60);
  
swf_popmatrix swf_pushmatrix ();
    
swf_scale (1-($p*.9), 1, 1);
    
swf_rotate (60*$p,  'z');
    
swf_translate (20+20*$p, $p/1.5, 0);
    
swf_rotate (270*$p,  'z');
    
swf_addcolor ($p, 0, $p/1.2, -$p);
    
swf_placeobject (1, 50);
    
swf_placeobject (4, 50);
    
swf_placeobject (5, 50);
    
swf_popmatrix ();
    
swf_showframe ();
  }

  for (
$i = 0; $i < 30; $i++) {
    
swf_removeobject (50);
    if ((
$i%4) == 0) {
        
swf_showframe ();
    }
  }

  
swf_startdoaction ();
  
swf_actionstop ();
  
swf_enddoaction

<< Exemples >>
Constantes prédefinies Shockwave Flash swf_actiongeturl
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -