public void InitFlash() { if (!EoLHook.IsHooked) { EoLHook.Hook(); } FlashUtil.Flash?.Dispose(); AxShockwaveFlash flash = new AxShockwaveFlash(); flash.BeginInit(); flash.Name = "flash"; flash.Dock = DockStyle.Fill; flash.TabIndex = 0; flash.FlashCall += FlashUtil.CallHandler; gameContainer.Controls.Add(flash); flash.EndInit(); FlashUtil.Flash = flash; byte[] swf = File.ReadAllBytes("rbot.swf"); using (MemoryStream stream = new MemoryStream()) using (BinaryWriter writer = new BinaryWriter(stream)) { writer.Write(8 + swf.Length); writer.Write(1432769894); writer.Write(swf.Length); writer.Write(swf); writer.Seek(0, SeekOrigin.Begin); flash.OcxState = new AxHost.State(stream, 1, false, null); } EoLHook.Unhook(); }