shape = new SWFShape(); $this->shape->setRightFill(255,0,255); $this->shape->addFill(100,0,200); $this->shape->movePenTo(0,0); $this->shape->drawLineTo(100,0); $this->shape->drawLineTo(100,100); $this->shape->drawLineTo(0,100); $this->shape->drawLineTo(0,0); $disp = $this->add($this->shape); $disp->moveTo(150,150); } protected function getAction() { return new SWFAction (" var clickState ; var inState ; onMouseDown = function() { clickState = 1; }; onMouseUp = function() { if(clickState == 1) { if(this.inState == 1) { this.actionEvent(); } clickState = 0; } }; this.onRollOver = function() { this.inState = 1; }; this.onRollOut = function() { this.inState = 0; }; actionEvent = function() { cgi = _root.lib.newCGI('RECT'); cgi.send(_root.rect._x +','+_root.rect._y); }; "); } protected function setDisplayEvent() { $this->getDisplayItem()->setName("button"); } } ?>