/// <summary> /// Called when Flash Player raises the FlashCallEvent (when an External Interface call /// is made by ActionScript) /// </summary> /// <param name="sender">The object raising the event</param> /// <param name="e">The arguments for the event</param> private void _flashControl_FlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e) { ExternalInterfaceCall functionCall = ExternalInterfaceSerializer.DecodeInvoke(e.request); ExternalInterfaceCallEventArgs eventArgs = new ExternalInterfaceCallEventArgs(functionCall); object response = OnExternalInterfaceCall(eventArgs); _flashControl.SetReturnValue(ExternalInterfaceSerializer.EncodeResult(response)); }
/// <summary> /// Raises the ExternalInterfaceCall event, indicating that a call has come from Flash Player. /// </summary> /// <param name="e">The event arguments related to the event being raised.</param> protected virtual object OnExternalInterfaceCall(ExternalInterfaceCallEventArgs e) { if (ExternalInterfaceCall != null) { return(ExternalInterfaceCall(this, e)); } return(null); }