时间:2021-07-01 10:21:17 帮助过:10人阅读
$t = new swftextfield();
$t->setfont( $f );
$t->setcolor( 0, 0, 0 );
$t->setheight( 400 );
$t->addstring( 'hello world' );
$m = new swfmovie();
$m->setdimension( 2500, 800 );
$m->add( $t );
$m->save( 'hello.swf' );
?>
******************************************************************************
渚嬩簩锛氳鏂囨湰鍔ㄨ捣鏉ext.php
$f = new swffont( '_sans' );
$pt = new swftextfield();
$pt->setfont( $f );
$pt->setcolor( 0, 0, 0 );
$pt->setheight( 400 );
$pt->addstring( '1000' );
$tt = new swftextfield();
$tt->setfont( $f );
$tt->setcolor( 192, 192, 192, 90 );
$tt->setheight( 350 );
$tt->addstring( 'points' );
$m = new swfmovie();
$m->setdimension( 2500, 800 );
$pts = $m->add( $pt );
$pts->moveto( 0, 0 );
$tts = $m->add( $tt );
$tts->moveto( 1300, 200 );
for( $i = 0; $i < 10; $i++ ) {
$m->nextframe();
$pts->scaleto( 1.0 + ( $i / 10.0 ), 1.0 + ( $i / 10.0 ) );
}
$m->save( 'text.swf' );
?>
*****************************************************************************
渚嬩笁锛氱粯鍒朵竴浜涘浘褰?nbsp; 缁樺埗绠€鍗曠殑鐩寸嚎 line.php
$m = new swfmovie();
$m->setdimension( 300, 300 );
$s = new swfshape();
$s->setline( 10, 0, 0, 0 );
$s->movepento( 10, 10 );
$s->drawlineto( 290, 290 );
$m->add( $s );
$m->save( 'line.swf' );
?>
******************************************************************************
渚嬪洓锛氭棆杞洿绾?br />$m = new swfmovie();
$m->setdimension( 300, 300 );
$s = new swfshape();
$s->setline( 5, 0, 0, 0 );
$s->movepento( -100, -100 );
$s->drawlineto( 100, 100 );
$ts = $m->add( $s );
$ts->moveto( 150, 150 );
for( $i = 0; $i < 100; $i++ ) {
$ts->rotate( 10 );
$m->nextframe();
}
$m->save( 'rotate.swf' );
?>
***************************************************************************
渚嬩簲锛?br />浣跨敤鍥剧墖
鏂囨湰鍜岃濡傜洿绾裤€佸渾銆佸姬銆佹洸绾垮拰鐭╁舰涔嬬被鐨勭畝鍗曠煝閲忓浘褰㈤兘鏄崄鍒嗕紭绉€鐨勶紝浣嗗湪鐞嗘兂鐨勬儏鍐典笅锛屾偍蹇呴』鑳借闂繖浜?flash 鍔ㄧ敾涓殑鍥剧墖銆傚€煎緱搴嗗垢鐨勬槸锛宮ing 搴撲娇鎮ㄥ彲浠ヨ交鏉剧殑浣跨敤鍥剧墖锛屽涓嬫墍绀?/p>
$img = new swfbitmap( file_get_contents( 'megan.jpg' ) );
$s = new swfshape();
$imgf = $s->addfill( $img );
$s->setrightfill( $imgf );
$s->movepento( 0, 0 );
$s->drawlineto( $img->getwidth(), 0 );
$s->drawlineto( $img->getwidth(), $img->getheight() );
$s->drawlineto( 0, $img->getheight() );
$s->drawlineto( 0, 0 );
$m = new swfmovie();
$m->setdimension( $img->getwidth() * 2, $img->getheight() * 2 );
$is = $m->add( $s );
$is->moveto( $img->getwidth() / 2, $img->getheight() / 2 );
for( $i = 0; $i < 10; $i++ )
{
$is->skewx( 0.02 );
$is->skewy( -0.03 );
$m->nextframe();
}
$m->save( 'image.swf' );
http://www.bkjia.com/PHPjc/444886.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/444886.htmlTechArticle5绉峱hp鏁欑▼鐢熸垚swf 鏂囦欢浠g爜 /* 涓嬮潰杩欏嚑娆緋hp鐢熸垚flash鏂囦欢浠g爜锛屾槸浠庣畝鍗曠殑鐢熸垚swf鏂囦欢鍒扮敓鎴?flash鍔ㄧ敾鏂囦欢绛夛紝姣忎釜瀹炰緥閮芥槸缁忓吀鐨勩€?*/...