I have an HTML page that contains the flash game Club Penguin. I'm trying to make a Desktop client for my website that allows the user to get and set flash variables. How can I access the Flash COM Object using a WebBrowser Control?
Here's what I have tried so far:
object o = webBrowser1.Document.InvokeScript("return document['cp_flash']");
ShockwaveFlash flash = (ShockwaveFlash)o;
Console.WriteLine(flash.FlashVars);
I expected to get FlashVars logged to the console, but instead got a NullReferenceException on line 3.
What am I doing wrong? Is this even possible in 2019?