/// <summary> /// Flashの関数を実行する /// </summary> /// <param name="methodName">メソッド名</param> /// <param name="param">引数</param> private void CallFlashMethod(string methodName, string param) { if (flash.FrameLoaded(0)) { flash.CallFunction("<invoke name=\"" + methodName + "\" returntype=\"xml\"><arguments><string>" + param + "</string></arguments></invoke>"); } }
/// <summary> /// Flashの関数を実行する /// </summary> /// <param name="methodName">メソッド名</param> /// <param name="param">引数</param> private void CallFlashMethod(string methodName, string param) { if (flash.FrameLoaded(0)) { var request = new XElement("invoke", new XAttribute("name", methodName), new XAttribute("returntype", "xml"), new XElement("arguments", new XElement("string", param) ) ); try { flash.CallFunction(request.ToString(SaveOptions.DisableFormatting)); } catch (COMException) { } } }