Tuesday, 20 August 2013

AS2: Load Flash Game

AS2: Load Flash Game

I've been trying to load one of my favorite flash games in AS2, but it's
not working. It requires me to load the base and the shockwave file.
Here's the code I used to load in Visual Studio: Shockwave File:
http://dragonfable.battleon.com/game/gamefiles/core.swf?strFileName=game13_1_0.swf
Base: http://dragonfable.battleon.com/game/
And it loaded the flash game perfectly fine without errors, but when I
tried in AS2 using a different approach but same shockwave file it
wouldn't load. Here's the code I used in AS2:
Security.allowDomain("*");
stage.showDefaultContextMenu=false;
var core = new Object();
core.path = "";
var strURL ="http://dragonfable.battleon.com/game/";
var strFileName;
if (strURL.indexOf("DragonFable") == -1)
{
core.path ="gamefiles/";
}
'strFileName
="http://dragonfable.battleon.com/game/gamefiles/core.swf?strFileName=game13_1_0.swf";'

No comments:

Post a Comment