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");
	 }

 }

Gポイントポイ活 Amazon Yahoo 楽天

無料ホームページ 楽天モバイル[UNLIMITが今なら1円] 海外格安航空券 海外旅行保険が無料!