§K¶O¦ô»ù¡A¥­­±³W¹º¡A«Ç¤º³]­p
¨t²Î³Ã­Ñ¡A©±­±³]­p¡A«ν·s¡C
²M¼ä¤½¥qªoº£¤uµ{©Ó¥]¡A©~®aªoº£¯»¨ê¡B¥~Àðªoº£
ªoº£¦Ñ®v³Å±M·~¬I¤u¡A¨Ó¹q§K¶O¦ô»ù¡I

­º­¶  ¡E  tw ½×¾Â ¡E µ{¦¡³]­p°Q½×     ¡E 

¥ÎPHP°ÊºA³Ð«ØFlash°Êµe

©ÐªF¡G¤p¤Ñ
µoªí®É¶¡¡G2007-04-13
[ÀËÁ|]


Macromedia ¤½¥q¥X«~ªº Flash °Êµe³nÅé²{¤w¸g¦¨�dWeb­¶­±¤W«D±`¬y¦æªºªí²{¤u¨ã¡Aºô¯¸¶}µoªÌ§Q¥Î¥¦¤Þ°_ÂsÄýªÌªº¿³½ì¡CµM¦Ó¤£©¯ªº¬O¡A¶È¶È¨Ï¥ÎActionforbidden³Ð«Ø°Êµe¨ü¨ì«Ü¤jªº­­¨î¡AMacromedia¤w¸g«Å§G¡A¥´ºâ©ñ±óFlash Generator�{«~¡AÂà¦Ó±Ä¥Î¤ä´©Flash MXªºCold Fusion¡A§Ú­Ìªººô¯¸±N¦V¦ó³B¥h©O¡H²{¦b¡A§Ú­Ì¥i¥H§Q¥ÎMing PHP®w¨Ó»´ÃP¦a°ÊºA³Ð«ØFlash°Êµe¡A¨Ã¥B©M§Ú­Ìªº¥N½XµLÁ_¶°¦¨¡C§Ú­Ì¥i¥H®Ú¾Ú¸ê®Æ®wùتº¸ê®Æ³Ð«Ø¥X¦UºØ¤£¦P®ÄªGªº°Êµe¡C
Ming °Êµe®w³Ìªì¥X²{¦bPHP4.05ª©¥»ùØ¡A´À¥N¤F¥H«eª©¥»ªºLibSwf¼Ò²Õ¡CMing ®w±Ä¥ÎC½s¼g¡A¤ä´©¦hºØ»y¨¥¡A¤U­±¥ý¬Ý¤@¤U¦p¦ó§Q¥ÎPHP¨Ó»s§@°Êµe¡C¸Ó®w¨Ï¥Î²³æ¡A©M PHP ºò±K¶°¦¨¡A¦ý¬O¡A¸Ó®w¤´µM³B©ó¹êÅ綥¬q¡A¥Ø«eªºª©¥»¬O0.2a¡A¦b½uªº±Ðµ{¡B¨Ò¤l¡B©MÀ°§U¤â¥U¥i¥HÅý§Ú­Ì¤è«K¦a¾Ç²ß¡AMingùتº¨ç¼Æ²Õ´ªº«Ü¦³±ø²z¡A¤è«KPHP©MFlash¶}µoªÌ¬d§ä¡C¨Ï¥Î PHP©MMing®w¡A¤£¦ýÅý§Ú­Ìªººô¯¸¦³µØÄRªº¸Ë¹¢¡A¦Ó¥B¥i¥H´î¤Ö¶}µoFlash°Êµeªº¶O¥Î©MÁc½Æªº³Ò°Ê¡C
¨Ï¥ÎMing®w¦³¨âºØ¤è¦¡¡A§Ú­Ì¥i¥H¤º´O¨ìPHPùØ¡]¹ïUnix¥­»O¦Ó¨¥¡^¡A¤]¥i¥H§â¥¦§@�d¤@­ÓPHP¼Ò²Õ¨Ó¹B¦æ¡AùØ­±ªº¨ç¼Æ¤ä´©©Ò¦³ªº¥­»O¡A¨Ï¥Î®É¤]µL»Ý¹ê¨Ò¤Æ¡C¦pªG§Ú­Ì§âMing®w§@�dPHP¼Ò²Õ¨Ó¹B¦æªº¸Ü¡A§Ú­Ì¥²¶·©ú½T¦a½Õ¥ÎMing®w¡A©M¨Ï¥Î¨ä¥L¼Ò²Õ¤@¼Ë¡AµM«á¨Ï¥Î¸Ó®wùتº¨ç¼Æ¡C¥Ñ©ó¨Ï¥Î«e¥²¶·¥ý¸ü¤J¼Ò²Õ¡A»P§âMing§@�d¤º³¡¨ç¼Æ½sĶªº¤è¦¡¬Û¤ñ¡A­n¦³¤@ÂI©Ê¯àªº¤U­°¡C
Ming®w¬O§¹¥þ§K¶Oªº¡A§Ú­Ì¥i¥H¨ì³Ð§@ªÌªººô¯¸¤U¸ü¡A¦a§}¬O¡Ghttp://www.opaque.net/ming/¡A¸Óºô¯¸¦³¸Ô²Óªº¨Ï¥Î¤â¥U©MÀ°§U¡A¦b¨Ï¥Î«e¡A½Ð¥ý¬Ý¬Ý¦w¸Ë©M°t¸m»¡©ú¡A¦ì§}¬O¡Ghttp://www.opaque.net/ming/install.html¡C¥t¥~¡A¦bPHPºô¯¸¤W¤]¦³¨Ï¥Î¤â¥U©M¸Ô²Ó»¡©ú¡A¦a§}¬O¡Ghttp://www.php.net/ming¡C
¤@¥¹§Ú­Ì¥¿½T¦w¸Ë©M°t¸m¤FMing®w¡A§Ú­Ì¥i¥H³Ð«Ø¤@­ÓPHPª«¥ó¡A±qPHPùؽեÎMingªº¨ç¼Æ¡A³q¹L½Õ¥Î¨ç¼Æ©MÄÝ©Ê¡A´N¥i¥H©w¸q§Ú­Ìªº°Êµe¤F¡C¦bPHP¼Ò²Õùئ³13­Óª«¥ó¡A´£¨Ñ¤FFlashªº¤@¨Ç¥\\¯à¡A¤]¦³´X­Ó©R¥O¥i¥H¨Ó±±¨îµo¦æ®Éªº°Ñ¼Æ³]©w¡C¤U­±´N¬Ý¬Ý¦p¦ó§Q¥Î¥¦¨Ó³Ð«Ø°Êµe¡C
¨Ï¥ÎMacromedia Flash³Ð«ØSWF®æ¦¡ªº°Êµe¡A§Ú­Ì¥ý³Ð«Ø¤@¨Ç²Å¸¹¡AFlash¦³¤TºØÃþ«¬ªº²Å¸¹¡G¹Ï§Î¡B°Êµe°Å¿è¡B«ö¶s¡C¤@¥¹§Ú­Ì³Ð«Ø¤F³o¨Ç²Å¸¹¡A§Ú­Ì´N¥i¥H§â¥¦­Ì½Æ»s¨ì³õ´ºùØ¡A¨C¤@­Ó«þ¨©ºÙ�d¤@­Ó¹ê¨Ò¡A¥i¥H©ñ¥ô·N¦hªº¹ê¨Ò¨ì§Ú­Ìªº³õ´ºùØ¡C±µ¤U¨Ó´N¥i¥H©w¸q³o¨Çª«¥óªº¦æ�d¤F¡A¤]´N¬O©w¸q°Ê§@©M¹B°Ê­y�Ù¡A¤]¥i¥H©w¸q°Êµeªº°Ñ¼Æ¡A¦p¤Ø¤o¤j¤p©M­I´º�©¦â¡A¦pªG»Ý­n¡A¥i¥H«O¦s¦¨.SWF¤å¥ó¡C
§Q¥ÎPHPªºMing®w³Ð«ØFlash°Êµe¡A©MMacromedia Flash¤@¼Ë¡A¥²¶·¥ý³Ð«Ø¤@¨Ç²Å¸¹¡A³o¨Ç²Å¸¹´N¬OPHPª«¥óªº¹ê¨Ò¡AµM«á©w¸q³o¨Çª«¥ó¦b°Êµe³õ´ºùتº¦ì¸m©M¬Û¤¬Ãö«Y¡A±µµÛ©w¸qª«¥ó¦b¨C¤@´Vùتº°Ê§@¡A³Ì«á©w¸q°Êµe¦Û¤v¡C§Ú­Ì¥i¥Hª½±µ§âSWFª½±µ¿é¥X¨ìÂsÄý¾¹¡A¤]¥i¥H«O¦s¦¨SWF®æ¦¡ªº¤å¥ó¡A¥H³Æ«á¥Î¡CFlashªºÀuÂI´N¬O¹Ï§Î¤Æªº¥Î¤á¤¶­±¡A§Q¥ÎMing®w¤£¦ý¥i¥H§ó¥[²³æªº±±¨îª«¥ó¡A¦Ó¥B¨ã¦³µL­­ªºÂX®i©Ê©M¦A¥Î©Ê¡C
¤U­±§Ú­Ì´N¥Î¤@­Ó§¹¾ãªº¨Ò¤l¨Ó¬Ý¬Ý¦p¦ó¨Ï¥ÎMing®w¡G


/* ­º¥ý³Ð«Ø¤@­Ó²Å¸¹¡A¨Ã¶ñ¥R�©¦� */
$square = new SWFShape();
$sqfill = $square->addFill(0, 0, 0xff);
$square->setRightFill($sqfill);
$square->movePenTo(-250,-250);
$square->drawLineTo(250,-250);
$square->drawLineTo(250,250);
$square->drawLineTo(-250,250);
$square->drawLineTo(-250,-250);

/* ¦b°Êµe°Å¿èùبϥΤW­±ªº²Å¸¹¡A¨Ã²K¥[¤@¨Ç¸}¥» */
$sqclip = new SWFSprite();
$i = $sqclip->add($square);
$i->setDepth(1);
$sqclip->setframes(25);
$sqclip->add(new SWFAction(\"stop();\"));
$sqclip->nextFrame();
$sqclip->add(new SWFAction(\"play();\"));
for($n=0; $n<24; $n++) {
$i->rotate(-15);
$sqclip->nextFrame();
}

/* ¤U­±³Ð«Ø«ö¶s */

function rect($r, $g, $b) {
$s = new SWFShape();
$s->setRightFill($s->addFill($r, $g, $b));
$s->drawLine(500,0);
$s->drawLine(0,500);
$s->drawLine(-500,0);
$s->drawLine(0,-500);
return $s;
}

$b = new SWFButton();
$b->addShape(rect(0xff, 0, 0), SWFBUTTON_UP | SWFBUTTON_HIT);
$b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER);
$b->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN);
$b->addAction(new SWFAction(\"setTarget(\'/box\'); gotoandplay(2);\"), SWFBUTTON_MOUSEDOWN);

/* ¤U­±³Ð«Ø°Êµe¡A¨Ã²K¥[¤W­±ªº²Å¸¹©M«ö¶s */

$m = new SWFMovie();
$m->setDimension(4000,3000);

$i = $m->add($sqclip);
$i->setDepth(3);
$i->moveTo(1650, 400);
$i->setName(\"box\");

$i = $m->add($b);
$i->setDepth(2);
$i->moveTo(1400,900);

/* ³Ì«á¡A§Ú­Ì§â¥¦¿é¥X¨ìÂsÄý¾¹ */

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

¦n¤F¡A¦b§Aªº¾÷¾¹¤W¹B¦æ¤@¤U¬Ý¬Ý¡A¬O¤£¬O©M¥ÎFlash³Ð«Øªº¤@¼Ë¡I­n±o¨ì§ó¦hªº¨ç¼Æ»¡©ú¡A½Ð°Ñ¦Ò¾Þ§@¤â¥U¡C



  • ÃÙ§Uºô¯¸       

    ¼s§Q¤£°Ê²£-·sªO¯S°Ï«ü¦W«×³Ì°ª¡B­È±o±z«H¿àªº¦n©Ð¥ò
    ±zªº¦«¥I,¼s§Q¥Î¤ß¬°±zªA°È
    ¼s§Q¤£°Ê²£-ªO¾ô¦b¦a¥Í®Ú³Ì¹ê¦b--·sªO¯S°Ï«ü¦W«×³Ì°ª¡B­È±o±z«H¿àªº¦n©Ð¥ò
    §¹¾ã©Ð°T¡A©Ð«Î¡B©±­±¼öªùºë¿ïª«¥ó¡A¼s§Q¤£°Ê²£ Àu½è¥ò¤¶¡A©Ð«Î¯²¸î¡B¶R½æ¸ê°T³z©ú¡A¥æ©ö¯u¦w¤ß¡I



  • ¡@¦@ 0 ¤H¦^À³

    ©m¦W¡G
    §G§i¤º®e¡G