How do I: Browser Trouble

Get help using Construct 2

Post » Tue Aug 02, 2016 8:39 pm

I have the browser as Chrome in the properties tab. Event sheet: Start of layout->Make sprite visible (initial invisible) Event-> when sprite visible Action->Browser ->Go to URL "I type in a simple URL like "http://www.google.com"
It will not work, any ideas? Thank you
B
19
S
10
G
1
Posts: 24
Reputation: 2,203

Post » Tue Aug 02, 2016 11:10 pm

I fixed the issue but now how do I return to Construct 2 (my game) after visiting the web page? Thanks
B
19
S
10
G
1
Posts: 24
Reputation: 2,203

Post » Wed Aug 03, 2016 1:25 am

If you called the webpage by making a javascript window.open call

Then You should be able to "Close" The Browser by calling that function with the Browser object that calls the function in your event sheet either on a timer or simply by minimizing the browser window..
but
Security limitations sometimes prevent browser actions. For example, the window Close action can only be used when the window was created by a javascript window.open call.

Not sure if thats what you mean...
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Thu Aug 04, 2016 7:06 pm

Thank you, I will work more on this. I tried the timer and close browser but it did not go back to my game (still experimenting). I did find a temporary solution, I embedded HTML code on my webpage that when clicked will bring me back to the previous browser page (my game). But still trying to find a cleaner way.
B
19
S
10
G
1
Posts: 24
Reputation: 2,203


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests