0

I need to implement a proxy pattern for flex action script. The source object contains 40-50 methods, and may keep increasing, so I hope I could avoid implementing individual methods in the source object.

I remember in java, I could use reflection to centralized all the proxy calls, is there any similar mechanism in Flex Action Script?

Thanks.

Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
BlueDolphin
  • 9,765
  • 20
  • 59
  • 74
  • Not exactly sure what you're after, but there's the as3 [Proxy](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Proxy.html) class and the Flex [ObjectProxy](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/ObjectProxy.html) – RIAstar Aug 09 '12 at 12:59

1 Answers1

0

I'm not sure what exactly you want to accomplish but there is a handy AVM bytecode library from AS3Commons that allows to create classes on runtime. There is example how to generate dynamic proxy.

Rytis Alekna
  • 1,387
  • 7
  • 17