You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a spritesheet loading problem. I'm generating a single file from the Animate CC. It contains two images that are mapped to one spritesheet. If I run my index.html file in the same location as the index.js file and folder images generated by Animate CC, everything works perfectly.
But if I move my index.js file and my images to another folder, the index.html file that performs charging, do not find the index.png file. The index.json file is normally found. In this case, my structure looks like this:
Sorry, I forgot to put the slash, but it was only in the commentary. In the code the path is correct.
Regarding the relative path, I can not use it that way because the js file and the images will be hosted on a different server where it will be my index.html file. So I'm using the parameter basePath.
On the Chrome network filter, the error is saying that LoadQueue class is looking for the image:
http: //localhost/web/images/index.png
That is, the same location where the index.html file is running. If the json file, it is found right on the way:
http: //localhost/files/images/index.json
Could this be a bug of LoadQueue class?
To reproduce this error, simply generate a file in Animate CC with some images, generating a spritesheet. Then just copy the js file and images folder to another folder.
In the index.html file, put in basePath parameter of class LoadQueue the address where it was placed the js file and images folder, as below:
var loader = new createjs.LoadQueue(false, "http://localhost/files/");
If this is using a SpriteSheet (export from Animate), then there might be an issue where the basepath is not propagated to the SpriteSheetLoader, so all it's children are loaded without the basepath. You might have some success with a newer version. This issue was fixed for PreloadJS 0.6.2 (included in the 2015.11.26 release of CreateJS)
It loads the manifest, but then fails to load any of the contents, getting 404 instead. The url attempted was http://localhost/games/assets/data/somedata.json
Is there something obvious I'm doing wrong?
Unfortunately due to the hosting situation outside of my control, I don't think I can change the path structure.
Activity
lannymcnie commentedon Apr 13, 2016
Could be missing a trailing slash? Try
http://localhost/files/instead. You can also use../files/since it is all relative.caiocanalli commentedon Apr 13, 2016
Sorry, I forgot to put the slash, but it was only in the commentary. In the code the path is correct.
Regarding the relative path, I can not use it that way because the js file and the images will be hosted on a different server where it will be my index.html file. So I'm using the parameter basePath.
On the Chrome network filter, the error is saying that LoadQueue class is looking for the image:
http: //localhost/web/images/index.png
That is, the same location where the index.html file is running. If the json file, it is found right on the way:
http: //localhost/files/images/index.json
Could this be a bug of LoadQueue class?
To reproduce this error, simply generate a file in Animate CC with some images, generating a spritesheet. Then just copy the js file and images folder to another folder.
In the index.html file, put in basePath parameter of class LoadQueue the address where it was placed the js file and images folder, as below:
var loader = new createjs.LoadQueue(false, "http://localhost/files/");Thank you
lannymcnie commentedon Apr 13, 2016
If this is using a SpriteSheet (export from Animate), then there might be an issue where the basepath is not propagated to the SpriteSheetLoader, so all it's children are loaded without the basepath. You might have some success with a newer version. This issue was fixed for PreloadJS 0.6.2 (included in the 2015.11.26 release of CreateJS)
caiocanalli commentedon Apr 13, 2016
@lannymcnie, the Animate is generating the file with the latest version. I downloaded the github sources, and also displays the same error.
Is there any way to fix it until the next release?
Thank you
lannymcnie commentedon Apr 13, 2016
Might be a different issue. Any chance you have a live example.
caiocanalli commentedon Apr 13, 2016
Yes, I tried to upload a zip file with my example here, but I could not. Can I go through email, or is there any place I can put it?
lannymcnie commentedon Apr 13, 2016
Feel free to email it to me: lanny [at] gskinner [dot] com
caiocanalli commentedon Apr 14, 2016
Hello @lannymcnie, I sent the email. You received?
fabian commentedon Apr 20, 2016
Seeing the same issue - looks like there's already a proposed fix: #169
dill0wn commentedon Feb 26, 2018
I know this is an old issue, but I'm having the exact same issue with the 1.0.1 release here: https://github.com/CreateJS/CreateJS/releases/tag/v1.0.1
I have folder structure similar to the following:
So i do
and the manifest looks like:
It loads the manifest, but then fails to load any of the contents, getting 404 instead. The url attempted was
http://localhost/games/assets/data/somedata.jsonIs there something obvious I'm doing wrong?
Unfortunately due to the hosting situation outside of my control, I don't think I can change the path structure.