require "Object.php";
require "TestPrint.php";

class Polygon extends Object
{
 function Polygon()
 {
   $this->Object();
   $this->addAction($this->PolygonAction(),"act");
   $this->Compire();
 }

 function PolygonAction()
{
  $a = new SWFAction
	("
	var x;
        var y;
	x = 100;
	y = 100;

	this.move = function(x_,y_)
	{
	 this.x += x_;
	 this.y += y_;
	};

        this.rotate = function(x_,y_)
 	{
	with(Math)
	{
	x_ = PI*x_/180;
        y_ = PI*y_/180;
	x = x*cos(x_) +y*sin(y_);
        y = -1*x*sin(x_) +y*cos(y_);
	}
	};

	this.scale= function(x_,y_)
	{
	x *=x_;
	y *=y_;
	};

	this.PrintName = function(){
	_root.print.text.text = 'sdfsdf';
	};
	this.drawLine =function(){
	_root.print.drawLine(0,0,x,y);
	};
        this.onEnterFrame = function(){
	rotate(60,60);
	//move(10,10);
	this.drawLine();
	};
	");
  return $a; 
 }
}

ming_useSWFVersion(6);
$m = new SWFMovie();
$m->setDimension(800, 600);

$A = new Polygon();
$P = new TestPrint();

$m->add($A->Layer());
$N = $m->add($P->Layer());
$N->setName("print");
$m->nextFrame();
$m->save("test.swf");
?>

楽天モバイル[UNLIMITが今なら1円] ECナビでポインと Yahoo 楽天 LINEがデータ消費ゼロで月額500円〜!


無料ホームページ 無料のクレジットカード 海外格安航空券 解約手数料0円【あしたでんき】 海外旅行保険が無料! 海外ホテル