jelawrence's Recent Forum Activity

  • I have uploaded png and css files in the Files section of the Project bar but I can't seem to locate where these files appear while previewing the project.

    When the game is exported, the files are saved in the root directory and can be accessed using "filename.png" (for example, background-image: url("filename.png") in a css file.

    However, in the web browser while previewing the game, "filename.png" does not work, nor does "files/filename.png" or "Files/filename.png".

    For loading CSS files from the files, I am running the script:

    link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = "style.css";
    document.head.appendChild(link);
    

    This as well only works when exported since style.css can not be located in the preview.

    How can I access imported files when previewing the project in Construct 3?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
jelawrence's avatar

jelawrence

Member since 27 May, 2020

None one is following jelawrence yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies