External game with Loader does not work in Flash, Action Script 3

I would like to upload a third-party game to my own swf so that I can take a picture of it. I use the standard flash.display.Loader class for the download part.

Third-party game example: http://andkon.com/arcade/adventureaction/megaminer/megaminer.swf

Embedding inside an html document seems fine, but not with Loader .

So it obviously works in one case, there must be a way to load it using ActionScript just like a simple html <embed> does.

There are no error messages, Event.COMPLETE triggered, but the game is stuck on the loading screen.

(Sidenotes: I have a working script that downloads some games perfectly, but there are some that won’t load properly. I also have a proxy server created in PHP to get around cross-origin resolution errors)

+4
source share
1 answer

It seems to me that the download is just fine (when you directly contact the game, it still remains on the download screen, which indicates the correct behavior).

So the problem is not the download, but the wrap you are loading it into. When you look at it on any website, most likely you are looking at the swf packer that loads this game into it - and in accordance with the recommendations of the site on which it is placed, the swf shell calls the launch function or something similar to discard his. You will need to see what you need to call in swf to run it.

You may be able to look at the site on which it is hosted and see if they publish their recommendations publicly for game developers, but I looked around a bit and that doesn't look like what they are doing.

Or you can decompile the swf shell and see what function it calls ... Although I do not promise that everything will be fine with you.


So, there is no swf wrapper ... Perhaps the game does a check to see if its width and height correspond to a predetermined size before it starts?

0
source

Source: https://habr.com/ru/post/1443329/


All Articles