JavaScript ALERT !!!!! :o

Discussion and feedback on Construct 2

Post » Thu May 15, 2014 11:12 pm

hello
Export my game in HTML5 and open it I get the following message.
I get the same in FIREFOX and CHROME
After precionar OK the screen goes black.
ALERTA.jpg


PLEASE HELP!

Greetings from chile!
You do not have the required permissions to view the files attached to this post.
B
43
S
11
G
2
Posts: 111
Reputation: 3,858

Post » Fri May 16, 2014 12:16 am

This only happens because you're running the game as a html page, from your local file system. For security reasons, some browsers block a few features when you do that. The game is probably not showing because you used one of those features.

This message won't show if you host your game on a server, or export your game to another format.
B
20
S
5
G
1
Posts: 37
Reputation: 1,139

Post » Fri May 16, 2014 12:26 am

uploaded it to dropbox and the same message, i play te game from the PUBLIC folder.
B
43
S
11
G
2
Posts: 111
Reputation: 3,858

Post » Fri May 16, 2014 12:29 am

You have to copy the public link from your index.html file in your dropbox folder and paste/go into the browser window. That should do it...
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,255
Reputation: 46,484

Post » Fri May 16, 2014 12:29 am

Probably because you accessing it as a file in dropbox rather than the web access service.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Fri May 16, 2014 12:51 am

worked smoothly before
B
43
S
11
G
2
Posts: 111
Reputation: 3,858

Post » Fri May 16, 2014 12:52 am

B
43
S
11
G
2
Posts: 111
Reputation: 3,858

Post » Fri May 16, 2014 5:11 pm

I don't have the error message by clicking on the link you gave.

This is what C2 does to alert people that run it in preview:

Code: Select all
<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>


However, that should not happen outside when uploaded and loaded from the public link.Can you confirm that the browser URL is the public link of the game?
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri May 16, 2014 5:58 pm

Locked game freezes and does not load.
B
159
S
27
G
17
Posts: 916
Reputation: 32,666

Post » Sat May 17, 2014 6:49 pm

Game loads and plays music in FF, as expected I guess. No dialog that I can tell of.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,312
Reputation: 71,092


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests