How i remove this error

Get help using Construct 2

Post » Fri Jun 17, 2016 12:10 am

how i fix this error Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)
B
2
Posts: 1
Reputation: 152

Post » Fri Jun 17, 2016 7:05 am

Rafael91122 wrote:how i fix this error Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)


As mentioned in the Manual:

You must export then publish (i.e. upload) the project before anyone else can play it.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Fri Jun 17, 2016 7:33 am

You could use Dropbox, (referral here https://db.tt/p5qml4Vb)
Then when you export to HTML5, export it to the public folder in your dropbox folders. After it's finished, right click on the index file and choose "Copy public link."
You can then paste that in your browser window or share it with a friend who can open the link in their browser.

(dropbox keeps a copy online where it's possible to play it.)
B
226
S
60
G
33
Posts: 902
Reputation: 39,955

Post » Tue Jun 21, 2016 7:15 am

go to index.html then remove this part
<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>

then SAVE. i hope i helped you :D
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Tue Jun 21, 2016 7:38 am

clarkkentnicdao wrote:go to index.html then remove this part
<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>

then SAVE. i hope i helped you :D


Just because you remove the notification doesn't mean that the game will work. It is the browsers own security that will proevent some features of the exported game from working, so removing the warning is not really the answer.

An analogy would be getting an 'oil warning' light appearing in your car so you decide to remove the bulb. The problem still exists, but you've just removed the warning.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Tue Jun 21, 2016 8:04 am

zenox98 wrote:
clarkkentnicdao wrote:go to index.html then remove this part
<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>

then SAVE. i hope i helped you :D


Just because you remove the notification doesn't mean that the game will work. It is the browsers own security that will proevent some features of the exported game from working, so removing the warning is not really the answer.

An analogy would be getting an 'oil warning' light appearing in your car so you decide to remove the bulb. The problem still exists, but you've just removed the warning.


ohh i see. so far my mobile games are working fine when even i remove that script :D
B
79
S
31
G
7
Posts: 148
Reputation: 9,179


Return to How do I....?

Who is online

Users browsing this forum: luck1210 and 3 guests