Path to images from library
Hi,
I have an Animate animation for HTML5/canvas. In the library, a clip is exported via a link ID. This clip includes an instance of a bitmap image on its timeline.
If I add an instance of the clip to the main stage and compile the animation, I can see the clip and the image, as expected.
If I open the resulting html file (as exported by Animate), everything also works fine: I can see the image.
Now here comes the tricky part:
Rather than opening the exported html file, I have another html page, with hand-made javascript code to instantiate the clip from the library.
It works–I can see the clip, but not the image inside.
The library is not stored in the same level as the main HTML file, but rather in a sub-sub-folder, and so is the /images/ directory.
So it makes sense somehow that the main file might not be able to guess where to find the image.
Looking inside the library's javascript file, I find this:
lib.properties = {
...
manifest: [
{src:"images/_01.png?1543916442531", id:"_01"}
],
...
};
So I assumed that I needed to edit the image path to adapt it to the main file:
src:"anim/Tests/images/_01.png?1543916442531", id:"_01"
"anim" being a folder at the same level as the main html file.
But it doesn't work: the image never appears.
I've also tried to move the library files to the root of the project (at the same level as the main html file), but it doesn't work either.
Any idea?
Also, I do not get any error message from the console.