Original Post
Hello,
I am making a game in HTML5 & Javascript and I'm having some issues in loading up external scripts.
The way the game is built is the data of all the game levels is stored in seperate javascript files where
a level object is created and level information is specified.
So inside my game engine I want to load 'on the fly' one level file and use that data to start a level.
I have tried using jQuery's getScript() but I only get a "Access to restricted URI denied"- exception.
I have tried having an empty script tag then changing the src-attribute to the specified path, because I read somewhere that it will load automatically if the src-attribute is changed.
One solution is to just load every level file in the HEAD-tag but there will be alot of levels and I like to compress my code as much as possible and also would very much like to learn how to do this.
Grateful for replies
David
I am making a game in HTML5 & Javascript and I'm having some issues in loading up external scripts.
The way the game is built is the data of all the game levels is stored in seperate javascript files where
a level object is created and level information is specified.
So inside my game engine I want to load 'on the fly' one level file and use that data to start a level.
I have tried using jQuery's getScript() but I only get a "Access to restricted URI denied"- exception.
I have tried having an empty script tag then changing the src-attribute to the specified path, because I read somewhere that it will load automatically if the src-attribute is changed.
One solution is to just load every level file in the HEAD-tag but there will be alot of levels and I like to compress my code as much as possible and also would very much like to learn how to do this.
Grateful for replies
David