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

search for in the

SWFMovie->addExport> <SWFMovie
Last updated: Fri, 20 Nov 2009

view this page in

SWFMovie->add

(PHP 4 >= 4.3.3)

SWFMovie->addAdds any type of data to a movie

Description

mixed add ( object $instance )
Warning

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.

Adds an SWF object instance to the current movie.

Parameters

instance

Any type of object instance, like SWFShape, SWFText, SWFFont.

Return Values

For displayable types (shape, text, button, sprite), this returns an SWFDisplayItem, a handle to the object in a display list. Thus, you can add the same shape to a movie multiple times and get separate handles back for each separate instance.

See Also



add a note add a note User Contributed Notes
SWFMovie->add
askypcom at gmail dot com
13-Jan-2009 04:22
<?php
$myShape1
=new SWFShape();
$myShape1->setLine(5,0,0,255);
$myShape1->setRightFill(255,255,0);
$myShape1->movePen(-30,-30);
$myShape1->drawLine(60,0);
$myShape1->drawLine(0,60);
$myShape1->drawLine(-60,0);
$myShape1->drawLine(0,-60);
$myMovie=new SWFMovie();
$myMovie->setDimension(460,80);
$myMovie->setBackground(255,0,0);
$movingSquare=$myMovie->add($myShape1);
$movingSquare->moveTo(40,40);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->nextFrame();
$movingSquare->rotate(-15);
$movingSquare->move(40,0);
$myMovie->save("lesson-spin.swf");
?>

Sachin Akhani
http://www.askyp.com

SWFMovie->addExport> <SWFMovie
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites