Alert message in index.html wrt exported games

Discussion and feedback on Construct 2

Post » Wed Nov 26, 2014 9:21 am

I get an error alert saying "Exported games do not work etc.,..." when trying to run the index.html inside cordova. Inside index.html I see the below code was newly added causing this. Removing this code removed the alert as well but runs fine inside Corodova...Is it expected to be removed like the way I did when running inside Cordova? OR am I doing something wrong?
-------
<script>
// Issue a warning if trying to preview an exported project on disk.
(function(){
// Check for running exported on file protocol
if (window.location.protocol.substr(0, 4) === "file")
{
alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");
}
})();
</script>
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Wed Nov 26, 2014 2:59 pm

Which export option did you choose? That check should only be there if you choose 'Export HTML5 website'. If you are exporting for Cordova you should choose 'Export for PhoneGap', which doesn't have that check.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450



Return to Construct 2 General

Who is online

Users browsing this forum: SubtleCoder and 8 guests