Running Alert For HTML export

Get help using Construct 2

Post » Sat Sep 27, 2014 4:52 pm

I want to export my file on HTML5 and then run it with node-webkit (Because there are two files and I don't want to have a double size for node-webkit runner) But when I want to run it I see the alert in the attachments. What shall I do now?
You do not have the required permissions to view the files attached to this post.
B
14
S
4
G
2
Posts: 91
Reputation: 2,430

Post » Sat Sep 27, 2014 5:07 pm

You should be able to safely remove the alert dialog from the exported project (it's in index.html)
B
10
S
2
G
1
Posts: 202
Reputation: 1,555

Post » Sat Sep 27, 2014 5:13 pm

@Noncentz705 Thanks it worked!
B
14
S
4
G
2
Posts: 91
Reputation: 2,430

Post » Sat Sep 27, 2014 5:15 pm

Code: Select all
   // 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.)");
      }
   })();


@Ashley, could you have it check for nw so we don't need to edit the exported html?

@amir np ;)
B
10
S
2
G
1
Posts: 202
Reputation: 1,555


Return to How do I....?

Who is online

Users browsing this forum: bluesun66, Yahoo [Bot] and 10 guests