Variables | |
| var | flixpub_fms_auth_mode |
| Authentication mode [number]. | |
| var | flixpub_fms_auth_arg_functions |
| Authentication functions and arguments [Array of fp.util.fms_auth_function_holder]. | |
flixpub_fms_auth_mode controls the authentication mode used to connect to the remote server.
Supported modes:
Use the flixpub_fms_auth_arg_functions array to store functions and arguments for use with kFmsAuthModeCustom.
The plug-ins will call FMS functions with the supplied arguments at connection time in order to authenticate.
// define fp, and fp.util var fp = new Object; fp.util = new Object; // constructor for function/arg holder object fp.util.fms_auth_function_holder = function (fname) { this.function_name = fname; this.args = new Array; } // implementation of function/arg holder object fp.util.fms_auth_function_holder.prototype = { get_args: function() { return this.args; }, add_arg: function(arg_str) { this.args[this.args.length] = arg_str; }, get_func: function() { return this.function_name; }, set_func: function(new_fname) { this.function_name = new_fname; } }
Calling Application.onConnect
If you wish to call the server side application.onConnect function, use onConnect for the function name.
// create a holder object for calling application.onConnect var function_holder = new fp.util.fms_auth_function_holder("onConnect"); // now add some arguments for the call to application.onConnect function_holder.add_arg("arg 1"); function_holder.add_arg("arg 2"); function_holder.add_arg("arg N"); // You can add as many arguments as you want, or none at all. The necessary // arguments It depends upon how the action script on your FMS server is // setup to authenticate connections. // Here's how you actually pass the function holder for the onConnect call // to the reference application. flixpub_fms_auth_arg_functions[0] = function_holder;