Is this Towns 2.0 or just Towns? Because I don't recall there being a domain check in the original or anything like that. All you needed was to embed the SWF or run it somehow.
Towns 2.0, I should have said that in the main post, sorry about that.
Here's the page source:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Towns | Gaia Online</title>
<script type="text/javascript">/*<![CDATA[*/function GAIA_config(key){return {"main_server":"www.gaiaonline.com","graphics_server":"s.cdn.gaiaonline.com","jscompiler_server":"w.cdn.gaiaonline.com","gsi_server":"www.gaiaonline.com","no_image":"\/\/s.cdn.gaiaonline.com\/images\/s.gif","avatar_server":"a2.cdn.gaiaonline.com","avatar_save":"avatarsave.gaiaonline.com","session_page":0,"cache_value":"1340"}[key.toLowerCase()];}/*]]>*/</script>
<script type="text/javascript">
/* <![CDATA[ */
var AC_FL_RunContent = 0;
var DetectFlashVer = 0;
function GAIA_launch(game) {
YAHOO.gaia.app.Header.launch(game);
}
/* ]]> */
</script>
<script type="text/javascript" src="http://w.cdn.gaiaonline.com/src/_/1340/pkg-gaia_core.js"></script>
<script type="text/javascript" src="http://w.cdn.gaiaonline.com/src/_/1340/pkg-gaia_gim_global.js"></script>
<script type="text/javascript" src="http://s.cdn.gaiaonline.com/src/js/AC_RunActiveContent.js?2"></script>
<script type="text/javascript" src="http://s.cdn.gaiaonline.com/src/common/header.js"></script>
<script type="text/javascript" src="http://s.cdn.gaiaonline.com/src/js/flash/launcher.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var requiredMajorVersion = '10'; // Major version of Flash required
var requiredMinorVersion = 0; // Minor version of Flash required
var requiredRevision = 45; // Revision of Flash required
/* ]]> */
</script>
</head>
<body style="margin:0; padding:0;">
<noscript>
<div class="requires-javascript"><p>Your browser has JavaScript disabled. <a href="http://www.google.com/support/bin/answer.py?answer=23852"><strong>Enable JavaScript</strong></a> on your browser for most GaiaOnline features to work correctly.</p></div>
</noscript>
<div id="swf_obj" style="display: none;">
<p style="text-align: center">Y U NO HAVE FLASH?!</p>
<div style="background-color: #eee; padding: 8px;">
<p>This application requires Adobe Flash.</p>
<p>You either don't have it installed, or you may have an older version.</p>
<p>Download Flash: <a href="http://get.adobe.com/flashplayer/">http://get.adobe.com/flashplayer/</a></p>
<p>Note: iOS devices (iPad, iPod, iPhone) don't support Flash.</p>
</div>
</div>
<script type="text/javascript">
/* <![CDATA[ */
/* Time tracking for spaces */
var start_time = new Date();
var elapsed_time = function() {
end_time = new Date();
var total_time = end_time.getTime() - start_time.getTime();
total_time /= 1000;
var tracking_image = new Image(1,1);
tracking_image.src = 'http://www.gaiaonline.com/internal/prd_t.php?pid=' + Math.floor(total_time) +
'&prd=84&loc=towns2&tm=' + end_time.getTime();
}
window.onbeforeunload = elapsed_time;
var unhideAlternative = function(e) {
if (e.success !== true) {
document.getElementById('swf_obj').style.display="block";
}
};
var embed = function () {
var params = {"flashvars":"g=towns2&gver=60&gsiUrl=www&websrv=www.gaiaonline.com&grsrv=s.cdn.gaiaonline.com","allowScriptAccess":"always","allowFullScreen":"true","salign":"","src":"http:\/\/s.cdn.gaiaonline.com\/images\/Gaia_Flash\/Towns2\/towns2.swf?60","base":"http:\/\/s.cdn.gaiaonline.com\/images\/Gaia_Flash\/Towns2\/","subdomain":"www","name":"towns2","game":"towns2","flversion":"10","flversionie":"10","gsiUrl":"www"};
var attributes = params;
swfobject.embedSWF("http://s.cdn.gaiaonline.com/images/Gaia_Flash/Towns2/towns2.swf?60", "swf_obj", "975", "650", "10", "//s.cdn.gaiaonline.com/src/js/persist/expressInstall.swf", "g=towns2&gver=60&gsiUrl=www&websrv=www.gaiaonline.com&grsrv=s.cdn.gaiaonline.com", params, attributes, unhideAlternative);
};
// Function to actually insert Flash content
var launch_flash = function() {
if (typeof swfobject !== "object") {
(new YAHOO.gaia.util.GaiaLoader({
require: ['gaiaswfobject'],
onSuccess: embed
})).insert();
} else {
embed();
}
}
var divhide = function(divname) {
YAHOO.util.Dom.get(divname).style.display = 'none';
return true;
}
// Gaia Framework Object ("???" - Filipe)
var GAIA = GAIA || {};
GAIA.GameFramework = {
id: 0,
storeID: function(ident) {
var g = GAIA.GameFramework;
g.id = ident;
},
getID: function() { return GAIA.GameFramework.id; }
};
// Gaia Sponsorship object ("?????!" - Filipe)
GAIA.Sponsorship = {
popup: function(url, name, w, h) {
var newWindow = window.open(url, name, 'width='+ w +',height=' + h + ',resizble=no,scrollbars=no,status=no,toolbar=no');
newWindow.focus();
}
}
YAHOO.util.Event.onDOMReady(function() {
launch_flash();
});
/* ]]> */
</script>
<div style="display: none">
<img src="http://www.gaiaonline.com/internal/fls_t.php?fid=522&cls=towns2&tm=1355446367">
</div>
</body>
</html>
And these faggot files:
<script type="text/javascript" src="http://w.cdn.gaiaonline.com/src/_/1340/pkg-gaia_core.js"></script>
<script type="text/javascript" src="http://w.cdn.gaiaonline.com/src/_/1340/pkg-gaia_gim_global.js"></script>
<script type="text/javascript" src="http://s.cdn.gaiaonline.com/src/js/AC_RunActiveContent.js?2"></script>
<script type="text/javascript" src="http://s.cdn.gaiaonline.com/src/common/header.js"></script>
<script type="text/javascript" src="http://s.cdn.gaiaonline.com/src/js/flash/launcher.js"></script>
Are the ones I'm having the trouble with. Also, if you see the part:
var unhideAlternative = function(e) {
if (e.success !== true) {
document.getElementById('swf_obj').style.display="block";
}
};
var embed = function () {
var params = {"flashvars":"g=towns2&gver=60&gsiUrl=www&websrv=www.gaiaonline.com&grsrv=s.cdn.gaiaonline.com","allowScriptAccess":"always","allowFullScreen":"true","salign":"","src":"http:\/\/s.cdn.gaiaonline.com\/images\/Gaia_Flash\/Towns2\/towns2.swf?60","base":"http:\/\/s.cdn.gaiaonline.com\/images\/Gaia_Flash\/Towns2\/","subdomain":"www","name":"towns2","game":"towns2","flversion":"10","flversionie":"10","gsiUrl":"www"};
var attributes = params;
swfobject.embedSWF("http://s.cdn.gaiaonline.com/images/Gaia_Flash/Towns2/towns2.swf?60", "swf_obj", "975", "650", "10", "//s.cdn.gaiaonline.com/src/js/persist/expressInstall.swf", "g=towns2&gver=60&gsiUrl=www&websrv=www.gaiaonline.com&grsrv=s.cdn.gaiaonline.com", params, attributes, unhideAlternative);
};
// Function to actually insert Flash content
var launch_flash = function() {
if (typeof swfobject !== "object") {
(new YAHOO.gaia.util.GaiaLoader({
require: ['gaiaswfobject'],
onSuccess: embed
})).insert();
} else {
embed();
}
}
var divhide = function(divname) {
YAHOO.util.Dom.get(divname).style.display = 'none';
return true;
}
// Gaia Framework Object ("???" - Filipe)
var GAIA = GAIA || {};
GAIA.GameFramework = {
id: 0,
storeID: function(ident) {
var g = GAIA.GameFramework;
g.id = ident;
},
getID: function() { return GAIA.GameFramework.id; }
};
That seems to be another part that could cause me problems.
Sounds like what I described. You'd use JavaScript to embed the SWF file in some page on gaiaonline.com. It's not hard to do, but that's assuming you know JavaScript.
I know how to do that, but wouldn't I need the other JavaScript that tells the swf what the different URLs are? I know how to do it without JavaScript, never tried it with JavaScript though. It would be awesome if you could give me a little lesson, I can provide you with a place on Gaia's servers where you would be able to embed it.