Browser->On went offline not working?

Bugs will be moved here once resolved.

Post » Tue Sep 04, 2012 6:47 pm

I put:
[CODE]
Browser->On went offline: do something in GUI
[/CODE]
but it doesnt work for Chrome (21) or FF (14.1) on a PC or safari on iphone4

I bascially switched off the wifi, and tried hitting a page in another tab so the browser really knew it was offline, but no joy.

I tried it from the preview on lan, and also I exported the project to apache 2 and hit that, but no joy.

Am I doing something wrong?

using R99nutmix2012-09-04 18:48:24
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Wed Sep 05, 2012 3:18 pm

I've tried it and it works fine here. It's a very simple event which just listens to when the browser says it's offline. Are you sure you're not falling back to some other connection so you're still online?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Sep 05, 2012 10:44 pm

Ashley, which version does it work on for you?

I pulled out my network cable, switched off wireless (have HW switch), and tried to hit a page (e.g. google) to check it failed. For the phones and ipads, I simply siwtched off my ADSL wireless router, then checked i could not access any web pages (there are no other access points near me).   I tried on iphone4, iphone 3, ipad2, PC with chrome and FF.

I would be very excited to get this working, as it would really help the app.
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Wed Sep 05, 2012 11:33 pm

I tested Chrome 21 and pulled out the LAN cable that the internet comes through and it triggered the event fine. Not sure why it wouldn't be for you - maybe a Chrome bug or something different about your setup... not sure there's a C2 bug here anyway.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Sep 06, 2012 11:27 am

Here is a published page which doesnt seem to work for me:

http://www.ohds.co.uk/c2/offlinecheck/

And here is the 2 line capx:

https://www.dropbox.com/s/0ky8tm5wkyw5c06/offlinetest.capx

Perhaps Im using it incorrectly?
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Thu Sep 06, 2012 12:55 pm

Both your examples work again here. Although for some reason this time at first it didn't seem like it was working, because Windows seemed to fall back to a wireless network on my laptop and kept a connection, so the event never fired. If I disabled the wireless then pulled out the LAN cable, the events fired. Still, this isn't an issue with Construct 2, it just listens for when the browser tells it the event happened - you might want to take this up with Google/Mozilla if it's important to you.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Sep 06, 2012 2:19 pm

It doesnt work for me on chrome either. Im using chrome 21.0.1180.89 on windows 7 pro 64 bit. Im 100% sure there is no network, as skype goes off line and I cant brows to any page after pulling the plug and wifi.

Does it work for anyone else?

Im accepting that popup wich asks if you want to use offline mode.nutmix2012-09-06 14:21:25
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Thu Sep 06, 2012 6:34 pm

I don't see a popup which says anything about offline mode. If you decline it or choose a different option does the event fire?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Sep 06, 2012 7:04 pm

[QUOTE=nutmix]http://www.ohds.co.uk/c2/offlinecheck/
[/QUOTE]

doesnt work in firefox nor in chrome for me :(
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Tue Sep 11, 2012 4:30 pm

Closing as I'm afraid I believe this is an issue with the browser rather than C2 - there's nothing we can really change here, we just listen to the events the browser tells us.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests