| Package | com.jeffdePascale.fosfr.utils.jsonHandler |
| Class | public class JSONHandler |
| Inheritance | JSONHandler flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| callbackAccessible : Boolean
Specifies whether a callback function with the name specified in the
_jsCallback parameter of the constructor is allowed to return information via the JSONHandlerEvent.CALLBACK object. | JSONHandler | ||
| Method | Defined by | ||
|---|---|---|---|
|
JSONHandler(_fosfr:FosfrBaseClass, _jsCall:String, _jsCallback:String)
Creates an instance of the JSONHandler class.
| JSONHandler | ||
|
call(... args):*
Calls the JSON function specified in the
_jsCall parameter of the constructor. | JSONHandler | ||
|
initialize():void
Activates the instance of JSONHandler, making the callback method accessible and setting callbackAccessible to true.
| JSONHandler | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the callback function is called from javascript. | JSONHandler | |||
| callbackAccessible | property |
public var callbackAccessible:Boolean
Specifies whether a callback function with the name specified in the _jsCallback parameter of the constructor is allowed to return information via the JSONHandlerEvent.CALLBACK object. Set to true autoamtically when initialize() is called.
The default value is false.
| JSONHandler | () | constructor |
public function JSONHandler(_fosfr:FosfrBaseClass, _jsCall:String, _jsCallback:String)Creates an instance of the JSONHandler class.
Parameters_fosfr:FosfrBaseClass — fosfr An instance of the fosfr class, used for debugging purposes and tests of fosfr.local to avoid security sandbox violations when running locally.
|
|
_jsCall:String — The name of the javascript method to call from the SWF.
|
|
_jsCallback:String — The name of the callback function
|
| call | () | method |
public function call(... args):*
Calls the JSON function specified in the _jsCall parameter of the constructor.
... args — Optional parameters to pass to the specified js function.
|
* — The response from the JSON function call. If none is received, returns null.
|
| initialize | () | method |
public function initialize():void
Activates the instance of JSONHandler, making the callback method accessible and setting callbackAccessible to true. If fosfr.local is false or ExternalInterface is unavailable, debug information will be displayed in the Fosfr debug panel.
| callback | event |
com.jeffdePascale.fosfr.utils.jsonHandler.JSONHandlerEvent
Dispatched when the callback function is called from javascript.