Begging for a working Cocoonjs AJAX Object/Plugin

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Begging for a working Cocoonjs Ajax Object/Plugin.

    Please Construct2 devs or plugin devs i beg you, can you make a CocoonJS IOS/Android working AJAX object/plugin. With the same functions as the standart AJAX in construct2 like request and post.

    And my suggestion to Scirra devs is; why don't you make special objects for CocoonJS to make it easy for us to creat great mobile games. It would be awesome if these Objects only showed up when a CocoonJS project created, instead of the standart Objects that give issues in CocoonJS.

    Sorry for my bad english,

    Thanks for reading have a nice day..

  • The existing AJAX object is supposed to work, but it doesn't due to bugs in CocoonJS. We've asked Ludei to fix it!

  • I'm pretty sure you don't know how to apply Cross Domain origin.

    Sometimes CocoonJS can't access to get files via AJAX due to CORS policy.

    I made a php file which allows CORS to every places. I hosted it on my server.

    Create a file

    ----------------------------------------------------------

    <?php

    header('Access-Control-Allow-Origin: *');

    ?>

    Insert your a wall of text here

    -----------------------------------------------------------

    Then upload at your server, make a .capx, grab your php file from server and export to CocoonJS, it worked like a charm.

    I hope it helps you, otherwise you need to give more explanation.

  • I just tried the latest CocoonJS launcher on Android and the AJAX requests don't seem to work still even when CORS is used. Joannesalfa, were you testing on iOS?

  • Joannesalfa

    Like Ashley i tried and same results on Android CocoonJS launcher.

    I saw the Clay.IO plugin, i think they use something like AJAX to make request and post. I don't want to use a plugin like that because, i don't want my games to connect unknown servers that are not in my control.

    I know enough PHP to code my own site like clay.io, but i don't know enough Javascript to develop my own AJAX plugin and the one that Construct2 provides is not working. Ashley can you provide us an Plugin that does basic Post/Request functions please. I realy need it. Maybe in the next update?

    Sorry for my bad english,

    Thanks for reading have a nice day..

  • Well, I looked further in to the AJAX object on CocoonJS. I eventually managed to isolate the bug in CocoonJS and work around it. So hopefully the AJAX object will be working on CocoonJS in the next build!

  • Thank you very much Ashley.

  • so just to make sure. Even local json/xml files that are needed to load with ajax won't work. That sounds crummy. Well hopefully it will be fixed next build ;) going to need it soon :P

  • I just tried the latest CocoonJS launcher on Android and the AJAX requests don't seem to work still even when CORS is used. Joannesalfa, were you testing on iOS?

    Yes, i tested on iOS iPod touch 4, i have an android tablet, the problem is i was unable login with my existent registration code in cocoonjs launcher, then i emailed to Ludei and they didn't reply me :/

  • I tested AJAX on CocoonJS loading local files, and that seemed to work too. So hopefully everything will be good.

  • YES. AJAX on CocoonJS. Games in going to construct 2 another level.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's really good news :)

  • Ashley, do u try it on ios the "request project file" (local) ?

    android still doesnt work right?

  • I tested requesting local files with AJAX in the latest CocoonJS launcher for Android and it worked fine. Make sure you're using the latest version of C2 which has the fix, otherwise post a .capx that you can't get working.

  • So is everything working now with AJAX with CocconJS ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)