1.IDataInterface.as:
package oreilly.cookbook {
public interface IDataInterface {
function set dataType(value:Object):void;
function get dataType():Object;
function update():Boolean;
function write():Boolean;
function readData():Object;
}
}
2.ClientData.as:
package oreilly.cookbook {
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
public class ClientData extends EventDispatcher implements IDataInterface {
private var _dataType:Object;
public function ClientData(target:IEventDispatcher=null) {
super(target);
}
public function set dataType(value:Object):void {
_dataType = value;
}
public function get dataType():Object {
return _dataType;
}