juannn91's Forum Posts

  • 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.

  • Hi I have posted the same error here https://www.scirra.com/forum/viewtopic.php?t=103706 but maybe here is more understandable

    am doing an ajax call to a service,in web works good but when i export to cocoonjs its doesn´t work.

    GET RESOURCE XHR 'myurl' storeage/emulated/0/android/com.ideateca.cocoonjslauncher/files/

    some one know why a cold have this error and where i can start to solve it?

    there is a .capx

    Thanks

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • Hi.

    yes is simpler this way

    thank.

  • gfigueroa the tutorial works for cocoonjs, it works fine on android and ios.

  • Hi i have write a tutorial with the solution i found, it works good.

    https://www.scirra.com/tutorials/914/fa ... njs/page-1

  • work's on iOS windows phone and android, it was the url encoding <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">.

    use encodeURI function of javascript before send your url to the browser action, you cold do it by a plugin or modifying the browser plugin

    i have wrote a tutorial for this:

    https://www.scirra.com/tutorials/914/fa ... r-cocoonjs

  • it was the url encoding, i solved calling a javascritp encodeURI function with a plugin

  • Hi, i have a game created on contruct2 and i have use the plugin browser, with the action open URL in a new window.

    it works good on android, but on iOS it doesn't work.

    I cold create a plugin only for calling a external url, but I see that construct do this on the browser plugin function.l

    Acts.prototype.GoToURLWindow = function (url, tag)

    {

    if (this.runtime.isCocoonJs)

    CocoonJS["App"]["openURL"](url);

    else if (!this.is_arcade && !this.runtime.isDomFree)

    window.open(url, tag);

    };

    so this use cocoonjs app for calling a url, what can i do to solve this?

    Thanks for your time

  • Hi PhoenixNightly, thanks for the answer.

    yes and how i can see if all of the puzzle that are on that frame = 1 have a variable in x state.

    in code wold be like this

    var pieces_with_angle_zero = 0;

    for( puzzle_piece in Puzzle) {

    if(puzzle_piece.angle == 0){

    pieces_with_angle_zero++;

    }

    }

    if(pieces_with_angle_zero == Puzzle.lenght){

    // you have complete the game

    }

    thanks

  • Thanks PhoenixNightly

    But if you use UID in a condition it picks the element with UID x, I have 3 elements and there how to get the variable of each specific element and compare if all of those variables have a state.

    thanks

  • Hi, How can i compare variable of the same object in different instances.

    I have a sprite object with 3 frames, each frame is part of a puzzle. so i generate 3 different sprites and put each one in a different frame (0,1,2)

    I need to verify if all the objects are in the right place.

    is there a way to do this with out using global variables.

  • try with Open URL in a New Window action of Browser Object

  • in iOS it doesn't work it's something about permissions. Because if you try to open other external link, it works perfectly.

    For read the score you need to concatenate with & like this:

    "https://twitter.com/intent/tweet?text= I Win "& my_var &" points &lang=es&url=www.my_url.com"

    do anyone knows how to do it on iOS ?

    Thanks