CakeFest 2017 NYC, the Official CakePHP Conference


(PHP 5 <= 5.3.0, PECL ming SVN)

SWFMorph->__constructCreates a new SWFMorph object


SWFMorph SWFMorph::__construct ( void )

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.

Creates a new SWFMorph object.

Also called a "shape tween". This thing lets you make those tacky twisting things that make your computer choke. Oh, joy!


This simple example will morph a big red square into a smaller blue black-bordered square.

Example #1 swfmorph() example

= new SWFMorph();

$s $p->getShape1();

/* Note that this is backwards from normal shapes (left instead of right).
     I have no idea why, but this seems to work.. */


$s $p->getShape2();

$m = new SWFMovie();

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

  for (
$r=0.0$r<=1.0$r+=0.1) {

header('Content-type: application/x-shockwave-flash');

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top