require "NewPrimitive.php";
require ".\Item\Item.php";
require ".\State\DragAndDrop.php";
class Root extends NewPrimitive
 {
	function Root()
	 {
	  $this->NewPrimitive();
	  $ItemDaze =new Item();
	  $StateOne =new DragAndDrop();
	  $this->addObject($StateOne->Layer(),"state");
	  $this->addObject($ItemDaze->Layer(),"item");
	 
	  $this->_action();
	  $this->compire();
	 }
	function _action()
	 {
	$this->addAction(new SWFAction("
 			item.setFaculty(this.state);
			state.setParent(item);
					"),"state");
	  }
  }

class Item extends NewPrimitive
 {
	function Item()
	 {
	  $this->NewPrimitive();
	  $this->addObject($this->Layer(),"primitive");
	  $this->_action();
	  $this->compire();
	 }
	function _action()
	 {
	  $this->addAction
		(
		new SWFAction(
		"
		var faculty;
		this.setFaculty   = function(facu){faculty.end();faculty =facu;facu._x=300;};
		this.onEnterFrame = function(){faculty.start();}; 
		this.onPress	   = function(){faculty.press();};
		this.onRelease    = function(){ faculty.release();};
		
		")
		,"act0");
	 }
 }

class DragAndDrop extends NewPrimitive
 {
 	function DragAndDrop()
	 {
	   $this->NewPrimitive();
	   $this->addObject($this->Object(),"primitive");
	   $this->_action();
	   $this->compire();
	 }
	 function _object()
	 {
	  $this->_object = new SWFShape();
	 }

	 function _action()
	 {
	 $this->addAction(new SWFAction("
	  var parent;
	  this.setParent =function(par){parent = par;};
	  this.start  =function(){;};
	  this.press  =function(){parent.startDrag();};
	  this.release=function(){parent.stopDrag();};
	  _root.end   =function(){parent.stopDrag();};
			"),"drag");
	 }

 }

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


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