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

class Matrix extends Object
{
	function Matrix()
	{
	$this->Object();
	$this->addAction($this->MatrixAction(),"act");
	$this->compire();
	}
	function MatrixAction()
	{
	$act = new SWFAction
	("
		var matrix;
		var max;
		var col;

		matrix = new Array(0,0,0,0,0
		         	  ,0,0,0,0,0
				  ,0,0,0,0,0
				  ,0,0,0,0,0);
		max=4;col=4;

		//二次元配列
		this.setArray = function(data_){
		matrix = _data;
		};
		this.getData = function(i,j){
		return matrix[4*i+j];
		};
		this.setData = function(i,j,num){
		matrix[4*i+j] = num;
		};

		//行列
		this.newMatrix =function(stringNam){
		_root.attachmovie('Matrix',stringNam,10);
		};
		
		this.multiplication= function(data_){
		for(i=0;i<4;i++)
		  for(j=0;j<4;j++){
			setData(i,j, getData(i,j)*data_.getData(j.i) ); 
		  }
		};

		this.printString = function(string){
			_root.print.text.text = string;
		};
			this.PrintName = function(){
			_root.print.text.text = 'ssddf';
		};
		this.onEnterFrame = function(){
			A = newMatrix('o');
			this.printString('0'+this.getData(0,0));
		};
	");
	return $act;
	}
}

ming_useSWFVersion(6);
$m = new SWFMovie();
$A = new Matrix();
$P = new TestPrint();
$m->setDimension(800, 600);
$m->addExport($A->Layer(),"Matrix");
$m->writeExports();


$N = $m->add($P->Layer());
$N->setName("print");


$m->add($A->Layer());
$m->nextFrame();

$m->save("matrix.swf");

テレワークならECナビ Yahoo 楽天 LINEがデータ消費ゼロで月額500円〜!
無料ホームページ 無料のクレジットカード 海外格安航空券 海外旅行保険が無料! 海外ホテル