How do I open the "default" browser?

Get help using Construct 2

Post » Mon May 25, 2015 6:52 pm

I made a button linking to our website, in the game menu (game is running in NW.js), but it opens an undefined windowed browser, not my default browser (chrome). I want it to use the user's default browser, how can i archieve it? :roll:
B
67
S
23
G
4
Posts: 365
Reputation: 6,721


Post » Tue May 26, 2015 1:34 am

It's a different problem!
B
67
S
23
G
4
Posts: 365
Reputation: 6,721

Post » Tue May 26, 2015 7:53 am

Dan please explain may be able to help
B
269
S
52
G
16
Posts: 2,045
Reputation: 44,128

Post » Tue May 26, 2015 8:03 am

I run my game via NW.js, and i have put a link in the game's main menu to our website. When i run the link while ingame, it opens a browser window, which is not the default browser i use for internet (chrome) but a window... i want it to open the default user browser.
B
67
S
23
G
4
Posts: 365
Reputation: 6,721

Post » Tue May 26, 2015 8:33 am

Dan When you create your project you might like to try DEFAULT windows in your work. Then add browser. I have tested it out when I open my work with line like below it does open.

on start of layout browser go to "http://cgpatel.co.uk" "NewWindow"

Just use default windows then Export it as NW.js. this should give you list of system to run on
B
269
S
52
G
16
Posts: 2,045
Reputation: 44,128

Post » Wed Jul 01, 2015 2:11 am

This doesn't work for me.... If I export my project using NW.js (with default browser in game settings) and use the Browser object to open a link in a new window, I just get a new NW window... @Danwood, did you find a way to get this to work by any chance?
Learning other engines, but C2 still rocks. Image Image Image Image
B
81
S
22
G
96
Posts: 2,467
Reputation: 58,351

Post » Wed Jul 01, 2015 5:03 am

@Colludium nope i didn't yet
B
67
S
23
G
4
Posts: 365
Reputation: 6,721

Post » Wed Jul 01, 2015 6:40 am

Last edited by korbaach on Wed Jul 01, 2015 8:16 am, edited 1 time in total.
B
67
S
24
G
7
Posts: 1,519
Reputation: 11,104

Post » Wed Jul 01, 2015 8:03 am

@korbaach, thanks! That question got me searching Google last night and I found the answer on github. Copy the first 2 lines of code (not the comments) from nw shell github and use Browser execute JavaScript action. And viola! :)
Learning other engines, but C2 still rocks. Image Image Image Image
B
81
S
22
G
96
Posts: 2,467
Reputation: 58,351

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests