web: expose more functionality in the FlashAPI
This implements more of the JavaScript API exposed by FP (as per https://web.archive.org/web/20100710000820/http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html)
- CurrentFrame
- GotoFrame
- IsPlaying
- Play
- StopPlay
- TotalFrames
Relates to #7868
If you can please fix up the two review comments, we can take this in. In the future I'd like to revisit this with some tests, too, but it's okay to add these without for now. Thank you so much!
Is this functionality still currently planned to be implemented/these changes merged soon? The two review comments seem to be simple fixes
Also @kjarosh pointed out in the Discord that we could use some tests on this. I can try to take a look at some of the others and see how it's done, just haven't done it before. But I'd be happy to pitch in, in an effort to get this merged.
Upon doing some manual testing against a simple example in my Azure environment, I have verified that it works to retrieve the Flash movie object by conventional modern methods like getElementById and getElementsByName, but it does not work to retrieve it via dot syntax or performing index operations on the DOM, which is what most old Flash code that used this aspect of Flash requires. I think what I'm trying to say is that Ruffle is not creating an HTML Object the way Flash once did. DOM Object Play Test
After talking this through further on Discord and looking into it, the missing integration here should probably be its own TODO. I can log a separate issue so that someone can work on it. Meanwhile, I can attempt to provide a test for this one as my contribution to getting this piece of it out.