How do I load a script from the scripts folder, file folder or any other URL?

0 favourites
  • 1 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hi,

    Today when I tried to run a game I had built a few months back, I got an error because the code found in a script file from the Scripts folder did not load.

    I pretty much tried everything but nothing works.

    Here is what I have tried so far

    • Do nothing since the files from the Scripts folder are loaded automatically. It didn't work
    • Load the script using loadScripts("script1.js") as instructed in the tutorial found here LINK. It didn't work.

    The file just had a simple alert("test") line in the code.

    In fact, the only thing that worked was when I loaded the script using this technique

    var js = document.createElement('script');

    js.type = 'text/javascript';

    js.src = 'https://cdn.jsdelivr.net/npm/canvas/filelocation';

    document.body.appendChild(js);

    Tagged:

  • Try Construct 3

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

    Try 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)