Intercepting page loads from SWF #15820
Replies: 3 comments
-
There has been talk, but this was never implemented: #1486 |
Beta Was this translation helpful? Give feedback.
-
Currently I believe the best way to accomplish your goal would be to use JPEXS Decompiler to edit the URL strings in your SWF files: https://github.com/jindrapetrik/jpexs-decompiler |
Beta Was this translation helpful? Give feedback.
-
@MrCheeze Thanks! This pointed me in a good direction. Another thing similar to #1486 would be adding a more generic callback mechanism, for either a preset or a user-defined set functions. @n0samu Thanks for the hint, didn't know that tool, could be quite useful. The issue is that often I still need to do something different than just changing the URL. But it might come handy for other things. For now, the super ugly hack of |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have an old project with a lot of SWF files. Many of these files, depending on the user's action, would load a hard-coded URL, often containing another SWF file. For example, a game menu would be one SWF, and on a click, it would load another SWF from a hard-coded URL.
I have all the SWF files involved in it, but I am not able to modify them. I want to host them all locally, and run them via JS, using the truly awesome Ruffle Wasm functionality!
What I would like to achieve is when an SWF tries to load a particular URL, I would get a callback into my JS, and load a specific SWF based on that url from a local filesystem.
I searched for something that could achieve that inside the Ruffle JS documentation, alas, I couldn't find anything. OpenURLMode "confirm" is kind of close to it, but I didn't find a way to abuse it for what I need... I also wondered if I could abuse traceObserver, but couldn't make that work...
Any ideas? Perhaps I'm missing something... Thanks in advance!
P.S. Got some success with a combination of OpenURLMode "confirm" and ... overwriting
window.confirm
to intercept what "confirm" displays, but that's really really ugly.Beta Was this translation helpful? Give feedback.
All reactions