movie = new SWFMovie(); $this->movie->setDimension(500,500); $this->movie->setRate(10); $this->movie->setFrames(10); } public function addObject($obj) { $displayItem = $this->movie->add($obj->getSprite()); $obj->setDisplayItem($displayItem ); } public function compile() { $this->movie->add($this->getAction()); for($i = 0;$i<100;$i++) { $this->movie->nextFrame(); } } public function getAction() { return new SWFAction (" _root.onEnterFrame = function() { if(_root._x != -1 ) { _root.init(_root); _root._x =-1; } }; _root.init = function(mc) { for(m in mc) { if(typeof(mc[m])=='movieclip') { mc[m].init(); _root.init(mc[m]); } } // gam = _root.lib.newCGI(); // gam.send('gam'); }; "); } public function save($str) { $this->movie->save($str); } } ?>