5绉峱hp鐢熸垚swf 鏂囦欢浠g爜_PHP鏁欑▼ | 甯涔嬪

WBOY
发布: 2016-07-20 11:08:21
原创
1333 人浏览过

5绉峱hp鏁欑▼鐢熸垚swf 鏂囦欢浠g爜
/*
涓嬮潰杩欏嚑娆緋hp鐢熸垚flash鏂囦欢浠g爜锛屾槸浠庣畝鍗曠殑鐢熸垚swf鏂囦欢鍒扮敓鎴?flash鍔ㄧ敾鏂囦欢绛夛紝姣忎釜瀹炰緥閮芥槸缁忓吀鐨勩€?br />*/
//棣栧厛寮€鍚痯hp鎵╁睍php_ming
$f = new swffont( '_sans' );

$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   $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   $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 {
$is->skewx( 0.02 );
$is->skewy( -0.03 );
$m->nextframe();
}

$m->save( 'image.swf' );


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/444886.htmlTechArticle5绉峱hp鏁欑▼鐢熸垚swf 鏂囦欢浠g爜 /* 涓嬮潰杩欏嚑娆緋hp鐢熸垚flash鏂囦欢浠g爜锛屾槸浠庣畝鍗曠殑鐢熸垚swf鏂囦欢鍒扮敓鎴?flash鍔ㄧ敾鏂囦欢绛夛紝姣忎釜瀹炰緥閮芥槸缁忓吀鐨勩€?*/...
相关标签:
swf
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板