At 8/21/14 12:19 AM, MSGhero wrote:
At 8/20/14 11:30 PM, indiest wrote:
Can I add the flashvars to my index.html manually? Or load them by javascript and pass them to the SWF.
No and maybe. You can't tell the game what the user's username is considering there's more than one user. Can't you just embed all your files into the swf like normal?
I added some code to index.html to pass the flashvars read from the outer iframe. Here's the code:
function getJsonFromUrl() {
var query = location.search.substr(1);
var data = query.split("&");
var result = {};
for(var i=0; i<data.length; i++) {
var item = data[i].split("=");
result[item[0]] = decodeURIComponent(item[1]);
}
return result;
}
var flashvars = getJsonFromUrl();
Now it seems to work for me. The reason I can't embed all my files into one swf is they sum up to ~40MB...