loading data from web service with ajax,not work cocoonjs :S

0 favourites
  • 5 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hi i have this data service url:

    http://servicedatosabiertosdesarrollo.c ... ormat=json

    i am using it for loading some questions for mi game, it works good on web. But when i try it to run the app with cocoonjs on mobile it shows me the following error:

    GET RESOURCE 'http://servicedatosabiertosdesarrollo.cloudapp.net/v1/Atencion_Reparacion_Integral_Victimas/setdatosjuego/?$format=json

    'storage/emulate/0/Android/data/com.ideateca.cocoonjslauncher/files/vitimalz_game_optimizado/http:/servicedatosabiertosdesarrollo.cloudapp.net/v1/Atencion_Reparacion_Integral_Victimas/setdatosjuego

    and the following warning:

    Its´s recommended to use utf8 or utf16 encoding. Loaded "http://servicedatosabiertosdesarrollo.cloudapp.net/v1/Atencion_Reparacion_Integral_Victimas/setdatosjuego/?$format=json" with 'Proprietary' encoding.

    is there someone that could help me? Thanks

  • Did you add a header to the file being served allowing ajax request from external domains? It might be being blocked by your server because the request came from a website that wasnt originally served by your server.

    PHP example

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi thanks

    yes the Access-Control-Allow-Origin it's solved, in browser it works grate look i put a .capx with an example,

    the ting is that when i try it on cooconjs it don't load the data but i don't know why.

  • I'm having the same issue in cocoonjs. I am loading several hundred images as project files. Some of the images are coming through, while others aren't. I'm wondering if it has something to do with the number of images I am trying to load?

    They load just fine in the cocoonjs launcher webview, but some of the images aren't loading at all in "Canvas/WebGL".

  • Hi in my case it whas server side permissions issue.

    In your case it can be memory manage problem, because on mobiles you have not enough ram space.

    try with 2 or 3 images.

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