Generating a Flash movie : SWFMovie « Utility Function « PHP

Generating a Flash movie


$movie = new SWFMovie();
$movie->setDimension(550, 400);

// Create the circle
$circle = new SWFShape();
$sprite= new SWFSprite();

// Add the circle to the movie
$displayitem = $movie->add($sprite);

// Add the Actionscript that implements the dragging
$movie->add(new SWFAction("
 circle.onPress=function(){ this.startDrag('');};
 circle.onRelease= circle.onReleaseOutside=function(){ stopDrag();};

// Display the movie
header("Content-type: application/x-shockwave-flash");

Related examples in the same category

1.A Simple Movie