downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SWFDisplayItem->remove> <SWFDisplayItem->moveTo
[edit] Last updated: Sat, 07 Jan 2012

view this page in

SWFDisplayItem->multColor

(PHP 4 >= 4.0.5)

SWFDisplayItem->multColorMultiplies the item's color transform

설명

void SWFDisplayItem::multColor ( float $red , float $green , float $blue [, float $a ] )
Warning

이 함수는 실험적입니다. 이 함수의 작동, 함수의 이름, 그리고 관련된 모든 문서는 이후의 PHP 릴리즈에서 예고 없이 변경할 수 있습니다. 이 함수의 사용에 관한 것은 사용자 책임입니다.

swfdisplayitem->multcolor() multiplies the item's color transform by the given values.

The object may be a swfshape(), a swfbutton(), a swftext() or a swfsprite() object. It must have been added using the swfmovie->add().

인수

These parameters are floats between 0.0 and 1.0:

red

Value of red component

green

Value of green component

blue

Value of blue component

a

Value of alpha component

반환값

값을 반환하지 않습니다.

예제

This simple example will modify your picture's atmosphere to Halloween (use a landscape or bright picture).

Example #1 swfdisplayitem->multcolor() example

<?php

$b 
= new SWFBitmap(file_get_contents("backyard.jpg"));
// note use your own picture :-)
$s = new SWFShape();
$s->setRightFill($s->addFill($b));
$s->drawLine($b->getWidth(), 0);
$s->drawLine(0$b->getHeight());
$s->drawLine(-$b->getWidth(), 0);
$s->drawLine(0, -$b->getHeight());

$m = new SWFMovie();
$m->setDimension($b->getWidth(), $b->getHeight());

$i $m->add($s);

for (
$n=0$n<=20; ++$n) {
  
$i->multColor(1.0-$n/101.01.0);
  
$i->addColor(0xff*$n/2000);
  
$m->nextFrame();
}

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



add a note add a note User Contributed Notes SWFDisplayItem->multColor
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites