Copy link to clipboard
Copied
I have a problem when I change an animate canvas file from html to php so it doesn't start up. In the Chrome browser, I get this message in the console:
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught ReferenceError: AdobeAn is not defined
at init (index.php:33)
at onload (index.php:105)
Failed to load resource: the server responded with a status of 404 (Not Found)
Inside the init function I get this marked with red text was comp = AdobeAn.getComposition ("89ED7AB5C946D849B35B1594202278DE")
With Microsoft's Edge browser, I get this message in the console: SCRIPT5009: SCRIPT5009: 'AdobeAn' is not defined index.php (33,2)
What is it due to? I want the canvas in the php file.
Now it works. I had the Swedish letter ö in the name of the .js file where the animation is located. Now it's solved.
Copy link to clipboard
Copied
It shouldn't have anything to do with PHP.
Are you sure all the CreateJS and specific Animate project JS is being included? No 404s in the developer tools Network panel?
Copy link to clipboard
Copied
Yes it is included <script src = "https://code.createjs.com/createjs-2015.11.26.min.js"> </script> in index.php when I use plain html so it works but not on PHP files. I wonder why it doesn't work. What does 404 mean?
Copy link to clipboard
Copied
peor wrote
I wonder why it doesn't work. What does 404 mean?
<script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
<script src="index.js"></script>
If this can't be found then AdobeAn is in no way defined and the process runs into more trouble in around line 33 with:
var comp=AdobeAn.getComposition("89ED7AB5C946D849B35B1594202278DE");
There you've got this Error:
Uncaught ReferenceError: AdobeAn is not defined
at init (index.php:33)
This error:
at onload (index.php:105)
Failed to load resource: the server responded with a status of 404 (Not Found)
is related to this line (02) in your index.php:
</head>
<body onload="init();" style="margin:0px;">
In the init() function the malaise with var comp=AdobeAn.getComposition(..); is going wrong.
Check if links and filenames are okay throughout, correct them if necessary and the problem should disappear. I don't think it has anything to do with your renaming your main document to *.php.
-Klaus
Copy link to clipboard
Copied
Now it works. I had the Swedish letter ö in the name of the .js file where the animation is located. Now it's solved.