KennyOops's Recent Forum Activity

  • Ok, I got the solution.

    find the {your path}\Construct 2\exporters\html5\plugins\audio\runtime.js

    line:1946

    change:

    let ret = 0;

    to:

    var ret = 0;

    then you can minify, and no blackscreen.

  • Junk email is still rampant....

  • Oh, my god, thousands of spam emails. For tutorial, Audit may be requried.

  • is possible to make work with JSON file?

    like, some user make their levels, construct will convert an array in a JSON string, and the php will make a JSON file?

    how work this for the picture? I mean, JSON is a string, AJAXcan send like 2000 characters or something like that... but if my JSON file is big than 2000 characters, how I can send a data to a PHP?

    I don't understand...

    Sorry, I don't know how to use JSON. I never use it before.

  • In my app, I want to implement the following:

    1. Insert a File chooser and a sprite plugins. (ok)

    2. Add event: (ok)

    condition: FileChooser On changed

    action: sprite Load image from FileChooser.FileURLAt(0)

    3. upload the above local image to the server. (I don't know how to do it.)

    I think I should use the AJAX to call a serverside php, but what's the parameter I should write?

    Thanks a lot.

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

    Solution:

    1. Refer to https://www.scirra.com/forum/ajax-image-request-troubles_t112942?&hilit=save+image+to+server&start=10, use Pode's ExtractImage plugin to convert the image to a base64 string.

    2. Refer to https://www.scirra.com/forum/viewtopic.php?f=147&t=92690&p=723457&hilit=save+image+to+server#p723457, write your own PHP script.

    3. Pass the base64 string to PHP script by AJAX plugin's action Post to URL.

    Thank you, angellondon, Pode, GameThirsty, and all.

  • Yes, I found the same problem. Box popped out normally, but couldn't close on my android 4.0.3 phone with firefox 30.0, iOS 7.1.2 too.

  • Yes, I also have this problem. On my android 4.0.3, firefox 30.0, It won't open the filechoose box, but on PC, it's ok.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't load an image from an Ajax request, you just get the URL. You can use standard URL encoding to pass any parameters you need to to the server.

    I doubt your third-party is going to let you run XSS anytime ever so as a workaround you can have them fetch the image from your server via a PHP script that gets it from the other server. It may lag a bit more than usual but it should work.

    nusbaumc, you remind me of fetching it from remote server in the first, and then there is no Cross-Domain problem. Thank you.

  • Ok, I think we encountered the similar question.

    .

  • Thank you Ashley

    The third-party server is a legal charging server, and the image I should get is a verify-code image.

    Can I use AJAX plugin requests my php interface to get the image from the third-party? The php interface is deployed on the same server with my game, via php I get and then process the image binary data, echo the response in the end.

    If so, anything can process the Ajax.LastData?

  • Ashley

    woo... I can't configure the server's HTTP response, it's a third-party server....now, it's a serious problem.

    what else can I do?

  • You cannot use the AJAX object, only Sprites 'Load image from URL'. You don't need to do anything other than give it the URL, but you must have permission to load images from the server (look up the Access-Control-Allow-Origin HTTP header).

    Ashley, I‘ve tried 'Load image from URL', but it didn't work.

    I should say that the URL is a servlet, just like this: 'http://aaa.bbb.com/Querylet?Id=anystring', Id is a in-parameter

    and the response will like these:

    Content-Type: image/jpeg;\r

    Content-Length: xx\r

    \r

    so...'Load image from URL' didn's get anything.

KennyOops's avatar

KennyOops

Member since 29 Jun, 2013

None one is following KennyOops yet!

Connect with KennyOops

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies