Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1985 connectés 

 


Dernière réponse
Sujet : [ PHP Flash] Ou trouver ça??
shinji J'ai trouvé un script et il me génère une erreur sur la ligne en gras car il n'a pas la FONT mais je ne l'ai pas non plus, où la trouver, je sais pas ce que c'est moi un fichier "test.fdb"???
 
<?
 
// Create the movie and set parameters
 
$movie = new SWFMovie();
$movie->setRate(18.0);
$movie->setDimension(1600,900);
$movie->setBackground(0x33, 0x66, 0x99);
 
// Set the font
 
$font = new SWFFont("../../common/test.fdb" );
 
// A string phrase
 
$txt_http = new SWFText();
$txt_http->setFont($font);
$txt_http->setColor(0xff, 0xff, 0xff, 0x00);
$txt_http->setHeight(60);
$txt_http->moveTo(0, 0);
$txt_http->addString("welcome to the information age." );
 
// String of ones and zeros
 
$txt_long = new SWFText();
$txt_long->setFont($font);
$txt_long->setColor(0xff, 0xff, 0xff, 0x00);
$txt_long->setHeight(30);
$txt_long->moveTo(0, 20);
$txt_long->addString("0011 0110 0101 0101" );
 
// Another string
 
$txt_world = new SWFText();
$txt_world->setFont($font);
$txt_world->setColor(0xff, 0xff, 0xff, 0x00);
$txt_world->setHeight(80);
$txt_world->moveTo(0, 20);
$txt_world->addString("this makes no sense." );
 
//
// Integrate text into movie
//
 
// greeting, with null alpha
$anim0 = $movie->add($txt_http);
$anim0->moveTo(200,400);
 
// add the 10001 string
$anim1 = $movie->add($txt_long);
$anim1->moveTo(200,500);
 
// reintroduce 10001 string
$anim2 = $movie->add($txt_long);
$anim2->moveTo(400,100);
 
// world of 1s and 0s
$anim3 = $movie->add($txt_world);
$anim3->moveTo(200,475);
 
// Fade in: Welcome to the information age.
// Fade in and scale ones and zeros string
 
for($i = 0; $i <= 13; $i++) {
 
   $anim0->addColor(0xff, 0xff, 0xff, 0xff*$i/20);
   $anim1->addColor(0xff, 0xff, 0xff, 0xff*$i/100);
   $anim1->scaleTo($i, $i);
   $movie->nextFrame();
 
}
 
// Flicker the $anim1 (ones and zeros) string
// Immediately remove it after making it flicker.
 
   $anim1->addColor(0xff, 0xff, 0xff, 0xff);
   $movie->nextFrame();
   $movie->remove($anim1);
   $movie->nextFrame();
 
// reintroduce the ones and zeros string
// Fade this string in and scale it again.
 
for($i = 0; $i <= 13; $i++) {
   $anim2->moveTo(200,500);
   $anim2->addColor(0xff, 0xff, 0xff, 0xff*$i/100);
   $anim2->scaleTo($i, $i);
   $movie->nextFrame();
}
 
// Fade in 'this makes no sense'
 
for($i = 0; $i <= 13; $i++) {
 
   $anim3->moveTo(200,275);
   $anim3->addColor(0xff, 0xff, 0xff, 0xff*$i/20);
   $movie->nextFrame();
 
}
 
// Prevent the animation from looping.
// (Thanks to Maxence Lange http://phpming.net for the tip.)
 
$movie->add(new SWFAction("gotoFrame(200); stop();" ));
 
// Output movie to the browser.
 
header("Content-type: application/x-shockwave-flash" );
 
$movie->output();
 
?>

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
shinji J'ai trouvé un script et il me génère une erreur sur la ligne en gras car il n'a pas la FONT mais je ne l'ai pas non plus, où la trouver, je sais pas ce que c'est moi un fichier "test.fdb"???
 
<?
 
// Create the movie and set parameters
 
$movie = new SWFMovie();
$movie->setRate(18.0);
$movie->setDimension(1600,900);
$movie->setBackground(0x33, 0x66, 0x99);
 
// Set the font
 
$font = new SWFFont("../../common/test.fdb" );
 
// A string phrase
 
$txt_http = new SWFText();
$txt_http->setFont($font);
$txt_http->setColor(0xff, 0xff, 0xff, 0x00);
$txt_http->setHeight(60);
$txt_http->moveTo(0, 0);
$txt_http->addString("welcome to the information age." );
 
// String of ones and zeros
 
$txt_long = new SWFText();
$txt_long->setFont($font);
$txt_long->setColor(0xff, 0xff, 0xff, 0x00);
$txt_long->setHeight(30);
$txt_long->moveTo(0, 20);
$txt_long->addString("0011 0110 0101 0101" );
 
// Another string
 
$txt_world = new SWFText();
$txt_world->setFont($font);
$txt_world->setColor(0xff, 0xff, 0xff, 0x00);
$txt_world->setHeight(80);
$txt_world->moveTo(0, 20);
$txt_world->addString("this makes no sense." );
 
//
// Integrate text into movie
//
 
// greeting, with null alpha
$anim0 = $movie->add($txt_http);
$anim0->moveTo(200,400);
 
// add the 10001 string
$anim1 = $movie->add($txt_long);
$anim1->moveTo(200,500);
 
// reintroduce 10001 string
$anim2 = $movie->add($txt_long);
$anim2->moveTo(400,100);
 
// world of 1s and 0s
$anim3 = $movie->add($txt_world);
$anim3->moveTo(200,475);
 
// Fade in: Welcome to the information age.
// Fade in and scale ones and zeros string
 
for($i = 0; $i <= 13; $i++) {
 
   $anim0->addColor(0xff, 0xff, 0xff, 0xff*$i/20);
   $anim1->addColor(0xff, 0xff, 0xff, 0xff*$i/100);
   $anim1->scaleTo($i, $i);
   $movie->nextFrame();
 
}
 
// Flicker the $anim1 (ones and zeros) string
// Immediately remove it after making it flicker.
 
   $anim1->addColor(0xff, 0xff, 0xff, 0xff);
   $movie->nextFrame();
   $movie->remove($anim1);
   $movie->nextFrame();
 
// reintroduce the ones and zeros string
// Fade this string in and scale it again.
 
for($i = 0; $i <= 13; $i++) {
   $anim2->moveTo(200,500);
   $anim2->addColor(0xff, 0xff, 0xff, 0xff*$i/100);
   $anim2->scaleTo($i, $i);
   $movie->nextFrame();
}
 
// Fade in 'this makes no sense'
 
for($i = 0; $i <= 13; $i++) {
 
   $anim3->moveTo(200,275);
   $anim3->addColor(0xff, 0xff, 0xff, 0xff*$i/20);
   $movie->nextFrame();
 
}
 
// Prevent the animation from looping.
// (Thanks to Maxence Lange http://phpming.net for the tip.)
 
$movie->add(new SWFAction("gotoFrame(200); stop();" ));
 
// Output movie to the browser.
 
header("Content-type: application/x-shockwave-flash" );
 
$movie->output();
 
?>

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)