ActiveRecord v0.1


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. package
  2. {
  3. import flash.utils.flash_proxy;
  4. import flash.utils.Proxy;
  5. import flash.utils.getDefinitionByName;
  6. import flash.utils.getQualifiedClassName;
  7.  
  8. public dynamic class ActiveRecord extends Proxy
  9. {
  10. public function ActiveRecord()
  11. {
  12.  
  13. }
  14. flash_proxy override function callProperty(method: *, ...args): * {
  15. try {
  16. var clazz : Class = getDefinitionByName(getQualifiedClassName(this)) as Class;
  17. return clazz.prototype[method].apply(method, args);
  18. }
  19. catch (e : Error) {
  20. return methodMissing (method, args);
  21. }
  22. }
  23. protected function methodMissing(method : *, args : Array) : Object{
  24. throw( new Error("Method Missing"));
  25. return null;
  26. }
  27. }
  28. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.