Xml request from tablet directory

0 favourites
  • 11 posts
  • Hello all !

    I'm currently working on a series of customizable mini games for a museum and I'm having trouble to make sure that I can call a XML file from a tablet folder.

    Ajax is used to get files from a web server but I wanted to know if it can be used to get it from the tab and if is it even possible to get a tablet folder adress ?

    If not, are there any alternatives (JSON or whatever)?

  • * Bump *

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you put it in with the project files?

    Otherwise, nope.

  • Well the first game I made for them used ajax to get a XML file from a server so it wont be very useful to see how it's made.

    Also I dont have the right to put the code online for everyone to see as it became their property at the end of my intership ... Sorry !

    However I can offer a quick peek of the XML import in the game :


    If you want to see what the game can look like please take a look at the "Archeo Pair Match" project on my blog.

    Basically the game graphical assets and some object positions are imported from the XML. Next step is to get them from the Android tablet and not from a server.

    Any ideas ?

  • If the XML file is a project file, the AJAX object's 'Request project file' action should work fine. How are you exporting/publishing?

  • Why would I need it?

    In the editor look under Projects, to the right, right-click on Files, click Import files.

    Add the Ajax object, for your action use "Request project file"


    Ninja'd by Ashley

  • Thanks for your answers but I realise my explaination wasn't very clear ...

    Ashley : I'm exporting with cocoonJS on Android.

    Newt : I can't put the file directly in the project as the game customization would be handled by non tech savvy people :(

    In fact i want the people from the museum (not programmers) to be able to modifiy the game graphic assets without opening C2 or making an APK.

    They would be able to modify XML files and put them in a folder on the tab in order to change the game logo, backgrounds and call different game assets that are linked to their current exposition (the assets would be on the tab as well).

    To sum up, I'm making some kind of customizable matching game engine for them, so they can adapt the games to whatever ancient civilization they are exposing.

    It wouldn't be a problem if they had rock solid wifi in the whole building as I have built a prototype that requests XML and assets from a web server but they asked me if it could be done directly from the tab and I'm not sure that it's possible.

    Is it ?

  • Why is it they can figure out how to replace an xml file, but not an image?


    The only other thing I could think of is embedding the images as base64 encoded urls into the xml.

    That would require a separate app.


    Xml wont work on Android.

    Json will however.

  • I need them to use an XML / JSON file because it contains the adresses of the images and potentially their xy positions.

    Are you implying that there is a simplier way to import images in the game without opening C2 ? Base 64 can be an option, I'll look into it !

    As for Xml on android it worked when we tested the game last september, was there any new android update that screwed this up ?

  • As I understood it xml wouldn't work on it, however that may just be for non local files.

  • Yup, you're right : I used it on a browser based game, it would'nt work with cocoonJS.

    My bad ! ;D

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