ruffle
ruffle copied to clipboard
Implement ImportAssets/ImportAssets2
Load the ImportAssets(2) url async and copy the character requested. This does not cover all cases because it requires extensive time of reversing the behavior of Flash but it fixes at least 2 real games I tested.
https://github.com/ruffle-rs/ruffle/issues/15017 (needs to set the HTTP referral if run on desktop, works perfectly as extension) https://github.com/ruffle-rs/ruffle/issues/10305
What you have so far largely feels correct, though I absolutely do think this needs some test cases, if only to rule out some of the speculation I put in the comments.
Testing can be tricky because of the async nature of the loading. I think flash locks the all vm to load something but in our case we cannot do it. So it works on these games because the loading is in the menu but if you make an artificial swf you need to put some arbitrary sleep and I'm not sure how to do it