0 Favourites

How do I load a local file as sprite image?

  • Hi! First I tried node-webkit but I switched to the AJAX object because the final app/game runs in a browser not in an .exe file.

    I tried several kinds of paths for local files and searched the forums but it does not seem to work with a local path. Is there a way to convert a local file to a data uri to use it for "Load image from URL" for a sprite object somehow?

    Short description of the project so far:

    On startup a list of files is loaded (since list files from node-webkit does not work I added a .txt file like this: file1.jpg|file2.jpg|file3.jpg to use the tokenat expression with the ajax data). Then a For loop is used to create new sprites for each found file and then the sprite image should be loaded from the harddrive.

    If this is not possible with local files, does it work if I install a local Apache webserver (like XAMPP) and then use the local url?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)