Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

SWFGradient->__construct()

(no version information, might be only in CVS)

SWFGradient->__construct() -- Creates a gradient object

Описание

class SWFGradient {

SWFGradient __construct ( void )

}

Внимание

Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ. Поведение этой функции, ее имя и относящаяся к ней документация могут измениться в последующих версиях PHP без уведомления. Используйте эту функцию на свой страх и риск.

swfgradient() creates a new SWFGradient object.

After you've added the entries to your gradient, you can use the gradient in a shape fill with the swfshape->addfill() method.

SWFGradient has the following methods : swfgradient->addentry().

This simple example will draw a big black-to-white gradient as background, and a reddish disc in its center.

Пример 1. swfgradient() example

<?php

  $m
= new SWFMovie();
 
$m->setDimension(320, 240);

 
$s = new SWFShape();

 
// first gradient- black to white
 
$g = new SWFGradient();
 
$g->addEntry(0.0, 0, 0, 0);
 
$g->addEntry(1.0, 0xff, 0xff, 0xff);

 
$f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT);
 
$f->scaleTo(0.01);
 
$f->moveTo(160, 120);
 
$s->setRightFill($f);
 
$s->drawLine(320, 0);
 
$s->drawLine(0, 240);
 
$s->drawLine(-320, 0);
 
$s->drawLine(0, -240);

 
$m->add($s);

 
$s = new SWFShape();

 
// second gradient- radial gradient from red to transparent
 
$g = new SWFGradient();
 
$g->addEntry(0.0, 0xff, 0, 0, 0xff);
 
$g->addEntry(1.0, 0xff, 0, 0, 0);

 
$f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT);
 
$f->scaleTo(0.005);
 
$f->moveTo(160, 120);
 
$s->setRightFill($f);
 
$s->drawLine(320, 0);
 
$s->drawLine(0, 240);
 
$s->drawLine(-320, 0);
 
$s->drawLine(0, -240);

 
$m->add($s);

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



add a note add a note User Contributed Notes
SWFGradient->__construct()
There are no user contributed notes for this page.

SWFGradient->addEntry()> <SWFGradient
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571