Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/begriffs/jsobject
Nicer JavaScript objects through ExternalInterface in ActionScript 3
https://github.com/begriffs/jsobject
Last synced: 3 months ago
JSON representation
Nicer JavaScript objects through ExternalInterface in ActionScript 3
- Host: GitHub
- URL: https://github.com/begriffs/jsobject
- Owner: begriffs
- Created: 2011-08-23T23:22:18.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-08-23T23:31:09.000Z (about 13 years ago)
- Last Synced: 2024-06-23T19:35:28.688Z (5 months ago)
- Language: ActionScript
- Homepage:
- Size: 93.8 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actionscript-sorted - jsobject - Nicer JavaScript objects through ExternalInterface in ActionScript 3 (File Formats / JavaScript)
README
Provides a nicer way to access JavaScript objects through
ExternalInterface in ActionScript 3.## Before
ExternalInterface.call('obj.method', arg1, arg2, ...);
ExternalInterface.call('obj.method2', arg1, arg2, ...);
ExternalInterface.call('obj.method3', arg1, arg2, ...);## After
var obj = jsObject('obj');
obj.method(arg1, arg2, ...);
obj.method2(arg1, arg2, ...);
obj.method3(arg1, arg2, ...);This library provides a global function jsObject(obj:String):Object. The
argument obj names a currently instantiated JavaScript object. The
function returns an ActionScript object with the same method signature
as the referenced JavaScript object, but without non-method properties.The ActionScript object stub uses ExternalInterface to pass parameters,
get return values, and marshall exceptions. If the JavaScript object
has no methods, or is not found, then jsObject returns null.