サイズを指定するためにSpriteでくくっています。
class Image extends NewPrimitive
{
var $_name;
var $_width;
var $_height;
function Image($name)
{
$this->_name = $name;
$this->NewPrimitive();
$this->addObject($this->Object(),name);
$this->compire();
}
function _object()
{
$this->_object = new SWFBitmap( fopen($this->_name,"rb") );
$this->_width = $this->_object->getWidth();
$this->_height =$this->_object->getheight();
}
function LayerSize($width,$height)
{
$this->_controller->scaleTo($width/$this->_width,$height/$this->_height);
return $this->Layer();
}
}
$m = new SWFMovie();
$m->setDimension(800, 600);
$back = new Image("00.jpg");
$char = new Image("ea.dbl");
$m->add($back->LayerSize(800,600));
$m->add($char->Layer());
$m->nextFrame();
$m->save("png.swf");