[TuT]How to load AS3 games using Flash[1]
Here is a tutorial where you can learn how to load as3 games using Flash,this is very important because if you are able to load it you can acces everything what is in the game.
well let`s begin:
1.I gonna take a random game,Roly-Poly Cannon: Bloody Monsters Pack
Now that we choose the game,we can get into the action
2.Open Flash and make a new actionscript 3.0 document ,select first frame right click and choose ACTIONS or simply hit F9 button to bring up the ACTIONS PANEL.
3.Inside it we gonna write the codes that actually load the game
4.Copy/Past this code
///imports we need themThe code is well explained...>__>as good as i can
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
///mhm this allows us to pass security
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("http://gdb7f05f097ff4e8b.api.playtomic.com/crossdomain.xml");
stage.showDefaultContextMenu = false;
///we declare now our vars
var gameURL="http://chat.kongregate.com/gamez/0011/0782/live/rolypolycannonbmp.swf";
var gameLoader:Loader;
var gameRequest:URLRequest;
var gameContext:LoaderContext;
var game:Object;
///this will load game
function Loadgame() {
gameContext = new LoaderContext(false,ApplicationDomain.currentDomain,null);
gameLoader = new Loader();
gameRequest=new URLRequest(gameURL);
gameLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onGameReceived);
gameLoader.load(gameRequest,gameContext);
}
///when game is received we use addChildAt so we can put anything we want over the game
///like buttons,textfields and others
function onGameReceived(GameReceived:Event) {
stage.addChildAt(GameReceived.currentTarget.content, 0);
game=Object(GameReceived.currentTarget.content);
gameLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onGameReceived);
}
///trace(gameURL)
///uselees to trace it again because it already have a trace function inside it
trace("Trainer successfully loaded!")
///finally is done!\
Loadgame();
//Note:This only works with AS3 games.
5.Now we can hack actually the game,maybe in oder tutorial i gonna explain how to do but as the title say i I summarize to load the game.
6.Export it as .exe go to File>Publish Settings>check the Windows Projector box and choose where to publish
And that is all!This is my first tutorial and also first post.
Also you can download the .fla from here: http://www.mediafire.com/?e8egdlfs0ulzefi