AJAX on Mobile

Get help using Construct 2

Post » Wed Oct 24, 2012 7:19 am

Hey guys.

Does anyone know how to get AJAX working on either AppMobi DC or CocoonJS? Or any other way to communicate with a server?

Cheers!
B
55
S
12
G
8
Posts: 339
Reputation: 9,334

Post » Wed Oct 24, 2012 7:33 am

CocoonJS and appMobi support XMLHTTPRequests, it depends what you implement like JSON, scores, get .txt, etc.
B
96
S
34
G
29
Posts: 3,138
Reputation: 28,234

Post » Wed Oct 24, 2012 7:44 am

Hey Joannesalfa. The inbuilt AJAX object fails in both DirectCanvas and CocconJS for me. With DC it results in a black screen, and with CoccoonJS it just doesn't do anything. So while both platforms, in principle, support AJAX, I was more referring to it's implementation in Construct.
B
55
S
12
G
8
Posts: 339
Reputation: 9,334

Post » Wed Oct 24, 2012 7:59 am

Ashley didn't implement XmlHTTPRequest feature and WebView for CocoonJS and appMobi on Construct 2, he claimed he is still working with that.

Otherwise, you manually need to edit c2runtime.js

It's complicated.Joannesalfa2012-10-24 08:02:48
B
96
S
34
G
29
Posts: 3,138
Reputation: 28,234

Post » Wed Oct 24, 2012 8:11 am

Righto. I might have a fiddle with the AJAX plugin.
B
55
S
12
G
8
Posts: 339
Reputation: 9,334

Post » Wed Oct 24, 2012 8:21 am

in CocoonJS, to develop standard XMLHttpRequest inside on canvas, there list parameters could work:
-open
-send

-onreadystatechange
-readyState
-responseText
-status
-statusText
B
96
S
34
G
29
Posts: 3,138
Reputation: 28,234

Post » Wed Oct 24, 2012 8:27 am

Weird... Ashley's already got a whole bunch of code for dealing with DirectCanvas...
B
55
S
12
G
8
Posts: 339
Reputation: 9,334

Post » Wed Oct 24, 2012 9:13 am

Yep, Ashley will fix it soon.
B
96
S
34
G
29
Posts: 3,138
Reputation: 28,234

Post » Wed Oct 24, 2012 11:43 pm

@Ashley how is going with AJAX system for mobiles?
B
96
S
34
G
29
Posts: 3,138
Reputation: 28,234

Post » Thu Nov 01, 2012 9:46 am

Bump
B
96
S
34
G
29
Posts: 3,138
Reputation: 28,234

Next

Return to How do I....?

Who is online

Users browsing this forum: BackendFreak, imhotep22 and 5 guests